another problem with variables
Moderator: General Moderators
another problem with variables
I have 10 tables/page in which I show the results from a search.I need to send the name from the table that is clicked on further with session_start.in $cname I have the value I want to send from every table. The problem is that When I want to send the $cname it always sends the 10th table name(the last on the page).How can I make it send the one is clicked on.I tryed in onclick and a href and is not working
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Code: Select all
while($data=mysql_fetch_array($result)){
$cname=$data[1];
$cmacro=$data[3];
$ccomune=$data[4];
#.....
?>
<a href="<?php $_SESSION['Name']=$cname;echo"A.DI.GE.htm";?>"- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
But storing information in an array doesn't solve my problem.How do I know which element from array to transmit?I tryed this but it doesn't work.Could you tell me how can I know which element from array to transmit?
<a href="<?php $_SESSION['people']=$cnm;echo "next.php"?>...>
After everything is outputed if I write like that doesn't transmit the wright one,only the last one.pls help.
Thank you!
<a href="<?php $_SESSION['people']=$cnm;echo "next.php"?>...>
After everything is outputed if I write like that doesn't transmit the wright one,only the last one.pls help.
Thank you!