• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need help with php coding...

LuckyTaxi

Diamond Member
Ok ... I have a php script that inputs names into a databse. if it's successful in doing so i would like to redirect user to the main page.

here's what i have so far. I have it display a generic message like "Successful" but i would like to return the user to the main page. obviously that last line didn't work and the page goes nowhere.

<?

@ $db = mysql_connect("localhost", "ki3_list", "!list!");

if (!$db)
{
echo "Error: Could not connect to database!";
exit;
}
mysql_select_db("ki3_list");
$query = "insert into list values
('$email')";
$result = mysql_query($query);
if($result)
echo "<meta HTTP-EQUIV='REFRESH' content='0'; url='index.html'>";
?>
 
use

header("Location: success.html")

and redirect to main page using meta tag in success.html
 
ok ... figured it out ... but now my bro says he rather have a popup box. how can i make it popup a box that says the user was successful in submitting ... blah blah blah
 
Back
Top