Jump to content

[SOLVED] if succees go here


ball420

Recommended Posts

i want to have the succes echo a particular web page not a link to the pae i have tried a few combinations but all with errors. here is my success code

//check if query successful 
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='viewguestbook.php'>View guestbook</a>"; // link to view guestbook page 
}

else {
echo "ERROR";
}

mysql_close();

Link to comment
Share on other sites

//check if query successful 
if($result){
header("Location: viewguestbook.php);
}

else {
echo "ERROR";
}

mysql_close();

 

Note that you can't echo anything before that header() though. Otherwise you'll have to use ob_start().

Link to comment
Share on other sites

i'm getting an error on line 39 but it all looks right to me

 

 
//check if query successful 
if($result){
header("Location: restaurant.php);   //do i have to specify a url?? or just the page
}

else {
//this is line 39     echo "ERROR";

}
mysql_close();  

?>

Link to comment
Share on other sites

<?php


//check if query successful 
if($result){
header("Location: restaurant.php");   //do i have to specify a url?? or just the page
}

else {
//this is line 39     echo "ERROR";

}
mysql_close();  

?>

 

Missed your closing "

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.