Hello
I work on a copy/ rename file system
the new file name must be a combo of index and of the id # that I got from a query
problem
how can I pass the resulitng id in a var named $ID
I need to pass that id value to $id
the sample below will explain my quest
how can I write $=... instead of my question marks
thank you
<?
$query = "select id from stories where username= '$username' and password= '$password' ";
$result= mysql_query ($query);
if ($username && $password == ""{
echo"<b>Missing field try again</b>";
}
else
{
echo"<b></b>";
}
$id= ????????
$old_file="index.php";
$new_file="index".$id. ".php";
rename($old_file, $new_file);
I work on a copy/ rename file system
the new file name must be a combo of index and of the id # that I got from a query
problem
how can I pass the resulitng id in a var named $ID
I need to pass that id value to $id
the sample below will explain my quest
how can I write $=... instead of my question marks
thank you
<?
$query = "select id from stories where username= '$username' and password= '$password' ";
$result= mysql_query ($query);
if ($username && $password == ""{
echo"<b>Missing field try again</b>";
}
else
{
echo"<b></b>";
}
$id= ????????
$old_file="index.php";
$new_file="index".$id. ".php";
rename($old_file, $new_file);