Hi Everyone, I am helping a good friend of mine to design a website, but we have got a bit stuck -
Hoping someone can help us out.
We are trying to add a var from our database into the header location.
like this -
header( "Location: resend.php?activate=$mobnumid");
Here is the complete code.
if($smsmobnum != '') {
$qry = "SELECT * FROM tbl_name WHERE var='$var' and var2='$var2' and var3='0'";
$result = mysql_query($qry);
if($result) {
if(mysql_num_rows($result) > 0) {
while($row_data = mysql_fetch_array($result)){
$mobnumid = $row['id'];
@mysql_free_result($result);
header( "Location: resend.php?activate=$mobnumid");
exit();
//$b1=false;
}
}
}
}
We are checking the database for an existance from our select query
If our results are true, ie. >0
then when would like to add the var $mobnumid to the header location. Like above
The page is redirecting correctly, but our variable $mobnumid is not being added.
What is it that we are missing?
Many thanks