Newbie Here.
Is ther a way to update a page based on a text area in a form.
I have a form that has two text areas one is for asking question of admin and the other is for public to see (Testimonial).
What I need is if the user fills out the form and uses the Testimonial text area
then the page is updated. If the question text area is used it doesnt update the page. In other words if the Testimonial text area is left blank the page doenst update. See code below
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$sql = 'SELECT Testimonial , First_Name , Last_Name , Company , City , State , Date FROM Comments ORDER BY Date DESC LIMIT 0, 30 ';
$result=mysql_query($sql);
$num=mysql_numrows($result);
if ($num==0) {
}else{
}
mysql_close();
$i=0;
while ($i < $num) {
$Testimonial=mysql_result($result,$i,"Testimonial");
$First_Name=mysql_result($result,$i,"First_Name");
$Last_Name=mysql_result($result,$i,"Last_Name");
$Company=mysql_result($result,$i,"Company");
$City=mysql_result($result,$i,"City");
$State=mysql_result($result,$i,"State");
$Date=mysql_result($result,$i,"Date");
echo "<b>$Testimonial<br>$First_Name $Last_Name $Company $City $State<br><hr>";
$i++;
}
?>