Welcome visitor
* Login
* Register
It is currently September 20th, 2019, 5:17 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Server Side » PHP



Post new topic Reply to topic  [ 3 posts ] 
Author Message
  Passing two 'id' variables
PostPosted: February 27th, 2009, 8:27 pm 
User avatar

Posts: 52
Hi,
<form action="process.php?id=1">
<input type="text" name="id">
</form>

I know that because url is the default method it will overwrite the id value, so what can i do to keep both of them?

Thanks.


Top
 Profile  
 
  Re: Passing two 'id' variables
PostPosted: February 27th, 2009, 8:38 pm 

Posts: 57
the easiest way would be using two different names for the variables but if for any oneofakind reason thats not an option here's a little trick

1. make the form method post
2. on the process.php you will have $_GET["id"] and $_POST["id"] to use at your sole discretion ;)


Top
 Profile  
 
  Re: Passing two 'id' variables
PostPosted: February 27th, 2009, 8:48 pm 
User avatar

Posts: 52
Nice, grazie :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

FORUMS » Server Side » PHP


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron