Have you tried echo $_POST['prod_id'];
pritaeas
Posting Prodigy
9,534 posts since Jul 2006
Reputation Points: 1,194
Solved Threads: 1,494
Skill Endorsements: 98
print"<br>prod_id is ".$prod_id; // Error with $prod_id
The line marked bold must be replaced with $_POST['prod_id'] as the variable is passed from previous form and the method used is POST so it will be $_POST['prod_id'] .
If method used is GET so it will be $_GET['prod_id'] .
Refer this
IIM
Practically a Master Poster
653 posts since Jun 2011
Reputation Points: 127
Solved Threads: 140
Skill Endorsements: 8
Agreed. register_globals is evil. You're also using short code in the form action - make sure its <?php Just because something worked in the past doesn't mean that it will continue to work. Hosts update the php version from time to time and you may find that certain structures, functions etc. stop working. You usually have a few years from deprecation to removal, enough time to update your code.
If you're sending the form to the container page, you can probably do without the action attribute altogether.
diafol
Keep Smiling
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,534
Skill Endorsements: 61
diafol, not sure where you see shortened code being used. I always try to use <?php and in looking over the code I posted, it is used like that in all cases I believe. Hopefully I didn't miss any. I do find every once in awhile when in a hurry that I do forget though.
here (line 27):
action="<? echo $_SERVER['PHP_SELF']; ?>"
diafol
Keep Smiling
10,838 posts since Oct 2006
Reputation Points: 1,675
Solved Threads: 1,534
Skill Endorsements: 61
Question Answered as of 3 Months Ago by
diafol,
EvolutionFallen,
migcosta
and 2 others