Hi I would love to know how can I pass the strings from a form to a php that will test if there is something in it and then post an alert message using this form to try and get data from it and then show if it was passed correctly.
HTML code:
<form action='' method=''>
Name:<input type='text' name='name' id='name'>
Age:<input type='text' name='age' id='age'>
message:<textarea name='message' id='message'></textarea>
<input type='submit' value='Send'>
</form>
Output:
<?php
if(isset($_POST['name']) && isset($_POST['age']) && isset($_POST['message'])){
$a = $_POST['name'];
$b = $_POST['age'];
$c = $_POST['message'];
if($a != NULL && $b != NULL && $c != NULL)
{
echo "
<script type='text/javascript'>
window.alert('Success'+ a + b + c)
</script>
";
}
};?>
While still in the same page from before but shows what I have typed in there into the alert box.
I would also appreciate if it comes with instruction on how to use it with get and post functions and also with links if it can be done?