Forum Moderators: coopster

Message Too Old, No Replies

Cannot get variables passed

New to this and need some help

         

ice101man

8:54 pm on Nov 20, 2004 (gmt 0)

10+ Year Member



I have my code for add, edit, delete, and i believe the search will work. However before i can test the search i need to have the variable passed through the url. I tried using the post method, with no success, and now moved on to get method which i like, unofortunately this does not seem to be working.

After i enter a client number that number should be passed to the next php page accessed. here is the code

Code to send variable:
<TD ROWSPAN="1" COLSPAN="1" WIDTH="113" HEIGHT="52">
<a href="flights.php?<?php echo $Client_num;?>">
<img border="0" src="images/flightsbutton%20copy.jpg" width="113" height="64"></a></TD>

Code to recieve the variable & echo it:
<?
$Client_num = $_GET['Client_num'];

echo "This clients number is: $Client_num";
?>

Adrian2k4

11:03 pm on Nov 20, 2004 (gmt 0)

10+ Year Member



you need to change the following:

<a href="flights.php?Client_num=<?php echo $Client_num;?>">

ice101man

11:23 pm on Nov 20, 2004 (gmt 0)

10+ Year Member



ok...i understand this code and reviewed it with some other people. Everyone says it looks ok but when i click on the flights button there is no varialbe appeneded to the url. It looks like this [sub.example.edu...]

There is no number or anything after the = sign.

any ideas on what may be wrong.

Thanks,
Dan

[edited by: coopster at 1:20 pm (utc) on Nov. 22, 2004]
[edit reason] generalized url per TOS [webmasterworld.com] [/edit]

coopster

1:26 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It seems as though your variable has no value assigned to it before you build the link.