Jump to content

Problems with POST data


Buyocat

Recommended Posts

I'm trying to make a form using some PHP and Smarty, the form I generate looks like this:
[code]
<fieldset>
<legend>Add Book</legend>
</legend>
<form action="http://www.myurl.com/elevator?state=library&action=submit" method="post">
<span>Title:
<input type="text" name="title" length="40" maxlength="40" value="" /></span><br />
<span>Author:
<input type="text" name="author" length="40" maxlength="40" value="" /></span><br />
<span>Publisher:
<input type="text" name="publisher" length="40" maxlength="40" value="" /></span><br />
<span>Genre:
<input type="text" name="genre" length="40" maxlength="40" value="" /></span><br />
<input type="submit" name="enter" value="Submit" /><br />
</form>
</fieldset>
[/code]
However when I submit data nothing gets posted. I have tried echoing out the data at the ?state & action specified but it isn't set (I am using an if clause and it's echoing out stuff to signify that the post data is unset). Anyone have a clue as to where my post data is going and what I can do to fix it?
Link to comment
Share on other sites

No, elevator is a directory and it has an index file that instructs the PHP with what to do, in this case it is calling a listener which is looking for states and actions and then triggering stuff. The listener is correctly finding the states and actions however the post data isn't finding its way through.
Link to comment
Share on other sites

I've been able to do some testing and I've found that if I write the address like so:
./?state=library&action=submit
instead of like this:
[a href=\"http://www.vaultedceilings.net/elevator?state=library&action=submit\" target=\"_blank\"]http://www.vaultedceilings.net/elevator?st...y&action=submit[/a]
then the form works correctly. Can anyone who understands the inner workings of HTML post explain to me why the second and more desirable expression does not work?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.