Well that's more of a PHP thing, not so much with JavaScript. You can't do alot(anything?) in Javascript to interact with a database.
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
var blah = document.getElementById(<textbox id>);
if(blah.value == "")
alert("blah is empty");
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
You can just validate it through javascript(Or to check if that field has some value or not.) But, Its much easier if you do it in php. eg.
if(isset($_POST['sci_name'])){
echo "Scientific name is ". $_POST['sci_name'];
}
if(isset($_POST['name'])){
echo "General name is ". $_POST['name'];
}
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356