I'm working on cearting a GUI for sending SMS in my project, but I'm facing problem. I had provided Javascript and the entire page is created with PHP.
I had also created a database to maintain the SMS which is being sent. Now whenever I'm clicking on "Submit" button, evenif the message and contact number is empty still there is a data being sent to the database.
also on refreshing the page a data is stored in the database.
Please help me.......It's very urgent.
Countering POST data re-post by refresh
Moderators: egami, macek, gesf
I'm not about to write this code for you, but I can give you a couple of suggestions..
if ($variable != '') {
do your stuff here..
header("Location: mypage.php");
} else {
$_SESSION['error'] = 'Sorry, something was empty.';
header("Location: error.php");
}
if ($variable != '') {
do your stuff here..
header("Location: mypage.php");
} else {
$_SESSION['error'] = 'Sorry, something was empty.';
header("Location: error.php");
}
egami wrote:I'm not about to write this code for you, but I can give you a couple of suggestions..
if ($variable != '') {
do your stuff here..
header("Location: mypage.php");
} else {
$_SESSION['error'] = 'Sorry, something was empty.';
header("Location: error.php");
}
thank you so much. code did help
