Welcome Guest, Not a member yet? Register   Sign In
No $_POST data

So my problem ended up not being CodeIgniter but WAMP. I didn't realize that WAMP didn't enable mod_rewrite by default. Enabling that did the trick.

<form action="<?php $_SERVER['SERVER_NAME'];?>/index.php/pdf/write" method="POST" enctype="text/plain">


<form action="<?php base_url();?>/index.php/pdf/write" method="POST" enctype="text/plain">


$_SERVER['SERVER_NAME'] does not return the base url of the application...............

Walked into the same problem, found out that $_SERVER['SERVER_NAME'] was www.mydomain.com. I'm overriding it to mydomain.com (without www.), and it works. Sigh, another 2 hours of my life wasted Sad

Why not just use the URL helpers (or form helper) to do this stuff for you instead of manually setting it? It's what they are there for.

I had some problems with posting files, I didn't get any post variables.
I was using Codeigiters form:


I fixed this problem with:

<form action="admin/upload/..." method="post" >

The codeigniters form displayed:
<form action="http://foo/admin/upload/..." method="post" accept-charset="utf-8" enctype="multipart/form-data">

and the problem it seems to be with enctype="multipart/form-data"

Theme © iAndrew 2016 - Forum software by © MyBB