Jump to content


Photo

Problems with POST data


  • Please log in to reply
3 replies to this topic

#1 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 03 June 2006 - 07:16 PM

I'm trying to make a form using some PHP and Smarty, the form I generate looks like this:
<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>
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?
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com

#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 03 June 2006 - 07:32 PM

action="http://www.myurl.com...&action=submit"

shouldn't that be elevator.php

blah.com/elevator.php?state=library&action=submit
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 03 June 2006 - 08:18 PM

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.
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com

#4 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 03 June 2006 - 10:02 PM

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?
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users