Jump to content

[SOLVED] SENDING DIFFERENT VARIABLE ON DIFFERENT CLICKS


aashcool198

Recommended Posts

This is my code. this will generate some links and whenever you click on a link than you are directed to some other page with the session variable. can i send a different session variable when i click on different link?

actually i want to pass different parameters of array1[] on different clicks.

 

 

 

 

 

 

 

 

 

 

<?php

 

$conn = mysql_connect('localhost', 'root', '') or die(mysql_error());

mysql_select_db('Sumeru Skills', $conn);

 

session_start();

 

$result = mysql_query("SELECT * FROM skills1 where parent = 'm'");

 

 

while($row = mysql_fetch_array($result))

  {

 

$array[] =  $row['skill'];

$array1[] =  $row['skill_id'];

 

  }

 

$count = count($array);

 

$_SESSION['skill_id'] = $array1[0];

 

 

for ($i = 0; $i < $count; $i++){

 

  echo "<a href='edit_child.php'>$array[$i]</a></br></br>";

 

  }

 

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.