Need help urgent!
Posted: Wed Jan 20, 2010 12:08 pm
Hi I got a small problem im sending an id to another page and cant $_GET it.
Code is for sending page:
Code is for receiving page:
in recieving page I am not GETing the saved_ids...
please tell me what I am doing wrong so that i can fix it and its very urgent.
Code is for sending page:
Code: Select all
<?php
include "../login/database.php";
$id =(isset($_GET['saved_id'])) ? (int)$_GET['saved_id'] : false;
if($id !== false)
{
$sql="SELECT * FROM konto";
}
else
{
echo "NO saved_id!";
}
$result = mysql_query($sql) or die("Kunde inte lägga till ny text:<br />" . mysql_error());
while($row = mysql_fetch_array( $result ))
{
$user=$row['user'];
$saved_ids=$row['saved_id'];
echo "<a href='Users.php?users=".$saved_ids."'>" .$user ."<br>" ."</a>";
}
?>
Code is for receiving page:
Code: Select all
<?php
include "../login/database.php";
$users =(isset($_GET['saved_ids'])) ? (int)$_GET['saved_id'] : false;
if($users !== false)
{
$sqls="SELECT * FROM konto WHERE saved_id=$users";
}
else
{
echo "NO saved_id!"."<br>";
echo $users;
}
$results = mysql_query($sqls) or die("Kunde inte lägga till ny text:<br />" . mysql_error());
while($rows = mysql_fetch_array( $results ))
{
echo $sqls;
}
?>
please tell me what I am doing wrong so that i can fix it and its very urgent.