HTML form does not submit $ _POST values

I am trying to create a form creator in PHP. This is one of them very stupid "needs a different look." I know this form should work, but it just doesn't send any $ _POST values. Here is the code.

<form method="post" action="http://projects.zesty-designs.co.uk/orderform" class="generatedform">
<label>Ebay Username</label><br />
<input type="text" name="ebay_username" value="" /><br />
<label>Email Address</label><br />
<input type="text" name="email_address" value="" /><br />
<label>Full Name</label><br />
<input type="text" name="full_name" value="" /><br />
<input type="submit" value="Submit" /><input type="reset" value="Start Again" />
</form>

      

Here is a live link in case anyone wants to try it out. http://projects.zesty-designs.co.uk/orderform .

+3


source to share


5 answers


It looks like most of the comments are correct.

It seems that the URL that is sending the information requires a trailing slash /

or a direct file link.



Thanks for answers.

+2


source


Try passing the full url in your action method;



http://projects.zesty-designs.co.uk/orderform/index.php

      

+1


source


You must add a .php suffix like action = "domain.com/somepage.php" (if it is actually a filename)

0


source


Try escape your caracters

it like this:

http:\/\/projects.zesty-designs.co.uk\/orderform

The backslash character has several uses. First, if it is followed by a non-alphanumeric character, it removes any special meaning that character may have. This use of a backslash as an escape character applies both inside and outside character classes.

Check the link for more information: Evacuation Sequences @ Php.net Manual

Basically in PHP your symbol is \

used for echo highlighting or symbol flags

0


source


I had the same problem with classic asp. I have IRE REWRITE RULE and web.config set like this:

<rule name="arulename">
 <match url="somematch" />
 <conditions>
  <add input="{REQUEST_METHOD}" matchType="Pattern" pattern="POST" negate="false" />
 </conditions>
 <action redirectType="Temporary" type="Rewrite" url="someurl" />
</rule>

      

My problem was that when I clicked the submit button the form didn't submit. my form was perfect action = "http: //website.extension/someshorturl" but there was no data to post. In other words, everything was correct, but the postal data was lost or deleted, and there were no configuration or coding errors. I found that since I set up my server myself that the domain was using www. prefix, it redirected everything without www. prefix first. I just had to change my form to say action = "http: //www.website.extension/someshorturl" and the post data appeared.

If anyone has the same problem as me, I hope this helps them.

I searched high and low using "POST DATA BEING LOST" and didn't get any help until I came here and this indicated a problem.

0


source







All Articles