Old 09-12-2009, 21:05   #1 (permalink)
teapoted
~
 
Join Date: Feb 2008
Location: London
Posts: 7,209
PHP Post without input

Never really had to do this before and I have no clue how to.

I have a page which displays all of the items in a table and formats each into an area with a button, (it's for a shop for my game) however I don't know how I can post variables without having fields for them, I'm guessing there's a way.

So basically, I have a button, posts to another php form, and need to be able to retrieve a couple of variables from inside the form that were not in an input. Or is there any sort of way of just having invisible inputs or to tell the php the name and value without dealing with inputs at all?

Code:
<form method='post'> variable variable <submit button> </form>

^Something like that basically. I could do it if I posted to the same page and used some if statements but it seems like a clunky way to do it.
__________________
  Reply With Quote
Old 09-12-2009, 21:13   #2 (permalink)
Cnut
Queef.
 
Cnut's Avatar
 
Join Date: Oct 2009
Location: Lady Garden
Posts: 169
Code:
<form method='post'> <input type="hidden" id="ID" value="Value"> <submit button> </form>
  Reply With Quote
Old 09-12-2009, 21:14   #3 (permalink)
teapoted
~
 
Join Date: Feb 2008
Location: London
Posts: 7,209
Damn I feel stupid now, I even searched around for it too.

Thanks a bunch.
__________________
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8