Still very new to PHP and enjoy every minute of it. Okay, I am trying to do a form validation for my database. I am trying to get the basics down of PHP by doing it my self. What I have done is very simple I take $_Post store it in a variable and check to see if it’s empty. That check works perfectly, the problem that I am having is how to get it to send the data to another php form after the validation using the form action. I found a function header to send the page to the user to another page, but I am unfamiliar with sending the data to the other page. This is my first attempt at a form validation, and I think that is an important aspect to becoming a web developer. Please look at my code and give me suggestions.
[php]
if(isset($_POST[“Japanese”])){
$Japanese = $_POST[“Japanese”];
if(empty($Japanese)){
echo ‘Japanese Field Box is empty, Please try again’;
}
else{
// right here is where I would like to send the data to my index.php where is looks up the Japanese word and translates it to English.
echo ‘it worked’;
$data = $_POST[“Japanese”];
header(“Location:index.php?data=$data”);
}
}
?>
Please Click this to look up your Japanese Word
[/php]
Is it at all possible, to some how have another form action send the data after it passes validation. I am unsure on how to achieve this. I hope this is clear.