Hi, this is html form: And let's say they get a error "Please enter ur title must be more then 3 character" then they click the BACK BUTTON AND ALL THERE DATA IS GONE!!
How i fix?
Code: <form action="u.php" method="post">
<INPUT TYPE=hidden NAME=name VALUE="<?php echo $_SESSION['user_name']; ?>">
<fieldset class="in" style="width:804px">
<legend>Submit Prayer</legend>
<div class="p9 ce">
<?php echo $l; ?>
Welcome, Please fill out the Prayer form and it will be submited into the Prayer Center!
</div>
<table class="ftbt">
<tr>
<td align="right" width="25%">Prayer Title:</td>
<td><input type="text" name="title" value="" size="30" maxlength="50"/></td>
</tr>
<tr>
<?php echo $pray; ?>
</tr>
<tr>
</tr>
<tr>
<td align="right">Level of Prayer:</td>
<td class="cL"><select name="level">
<option value="1">Please God Right Now</option>
<option value="2">In a Few Minutes</option>
<option value="3">Maybe today</option>
<option value="4">Sometime this Week</option>
<option value="5">In a couple of Years</option>
<option value="6">Whenever you want</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top">Prayer:</td>
<td><textarea name="prayer" cols="88" rows="11"></textarea></td>
</tr>
<tr class="bts ce"><td colspan=2><b>Security Code Confirmation</b></td></tr>
<tr>
<td align="right">Your unique security code<input type="hidden" name="secId" value="76c2b0e6f20ed0f1b209bcf39dee8e06"></td>
<td>
<img src="php_captcha.php">
<span class="desc">If The images are broke, please contact us.</span></span>
</td>
</tr>
<tr>
<td align="right" >Confirm security code:</td>
<td><input type="text" size="3" maxlength="5" name="number" />
<span class="desc">Please Enter the 3 Digit code above, Only Numbers are allowed.</span></td>
</tr>
</table>
This is my PHP u.php
Code: <?php
include 'dbc.php';
page_protect();
session_cache_limiter('private,
must-revalidate');
header('private, must-revalidate');
if (!isset($_SESSION['user_id'])) {
$e = "";
}
$title = $_POST['title'];
$text = $_POST['prayer'];
$time = date("D, M j Y, h:ia");
$name = $_POST['name'];
if(trim($_POST['title'])=='' || strlen(trim($_POST['title'])) > 30 || strlen(trim($_POST['title'])) > 30){
echo "Please enter a Title between 3 and 30 characters!<br />"; //concatenate the $error Message with a line break
exit;
}
//maybe dont need $private = $_POST['private'];
if(trim($_POST['name']) > 20){
echo "Please enter a username between 3 and 20 characters!<br />"; //concatenate the $error Message with a line break
exit;
}
$key=substr($_SESSION['key'],0,3);
$number = $_REQUEST['number'];
if($number!=$key){
echo '<center><font face="Verdana, Arial, Helvetica, sans-serif" color="#FF0000">
Validation string not valid! Please try again!</font></center>';
exit;
}
else
{
unset($_SESSION['key']);
/*
if (!isset($_SESSION)) {
session_start();
}
// anti flood protection
if(isset($_SESSION['lol']) && $_SESSION['lol'] > time() - 30){
// users will be redirected to this page if it makes requests faster than 2 seconds
echo "Stop flooding please";
exit;
}
$_SESSION['lol'] = time();
*/
mysql_query("INSERT INTO `prays` (`title`,`prayer`,`time`,`level`,`nameid`,`name`) VALUES (
'". mysql_real_escape_string($_POST['title']) ."',
'". mysql_real_escape_string($text) ."',
'". mysql_real_escape_string($time) ."',
'". mysql_real_escape_string($_POST['level']) ."',
'". mysql_real_escape_string($e) ."',
'". mysql_real_escape_string($name) ."');") or die(mysql_error()) ;
mysql_close();
}
?>
sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the t-code for looking up items in our system. I noticed that on the main menu HELP->SETTINGS
please help
HTML Code:Code: <span id="ctl00"><span> <div class="ldpPropFeatures"> <div
How to get exact 3 moths post date from today date using javascript
How to get exact 3 moths post date from today date using javascriptPlease help
Motivational Posters
Hello,I wonder how can i do them in php. Are there any sample codes that you can show me?thanks in advance
Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:\wamp\www\logs\pages\members.php on line 16, what did I do wrong?? <?php $sql = "SELECT *
compile php5 with DOM
Hi,I can't manage to compile php 5.3.0 from source on Windows to include DOM,in spite of the documentation saying that DOM is built into PHP5.I'm compiling php 5.3.0 using the following minimalistic
PHP time (deadline within one week)
I have a column ['projdue'], which stores the deadline for a project.I have PHP code and <span class>'s to show projects that are within timescale, due today and overdue:Code:
When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('./ip.php')".In the included file I have $ip = $_SERVER['REMOTE_ADDR']; and when it FIRST
do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work, the page hangs... what am i doing wrong here??<?php$number = 5;?><?phpwhile
Check before inserting in DB ???
This is my code--------------- if ( $_POST ['Submit']){{$username = $_POST ['usernm'];$userpassword = $_POST ['userpw'];}/*insert data from the form into the db table*/ $querypost = mysql_query