im new to web dev. i installed apache/mysql/php
i have been able to create a simple form page :
<html>
<h1>Open New RPA trace</h1>
<form action="addrpa.php" method="post">
<title>Open New RPA
</title>
<table>
<tr><td>Airwaybill</td>
<td><input type="text" name="awb"></td></tr>
<tr><td>Youre ID</td>
<td><input type="text" name="id"></td></tr>
<tr><td>Youre Station</td>
<td><input type="text" name="station"></td></tr>
<tr><td>Youre Phone nbr </td>
<td><input type="text" name="phn"></td></tr>
<tr><td>Youre Country </td>
<td><input type="text" name="cty"></td></tr>
<tr><td>Queue To Station</td>
<td><input type="text" name="q"></td></tr>
<tr><td>Text for Trace</td>
<td><input type="text" name="trace"></td></tr>
</table>
<input type="submit" value="submit">
</form>
</html>
and php for handle store in mysql :
<?
$awb=$_POST['awb'];
$id=$_POST['id'];
$station=$_POST['station'];
$phn=$_POST['phn'];
$cty=$_POST['cty'];
$q=$_POST['q'];
$trace=$_POST['trace'];
$connection=mysql_connect("localhost", "mokum", "mokum");
mysql_select_db("rpa", $connection);
$results=mysql_query("INSERT INTO input (nmbr, awb, id, station, phn, cty, q, trace)
VALUES ('$nmbr', '$awb', '$id', '$station', '$phn', '$cty', '$q', '$trace')") or
die('Error making query');
echo'Processing';
?>
this took me 8 hours,, lol
but this works fine.. i can do posts,, mysql adds new rows. what i want to do is, on the webserver a vb app is checking whether a new row is added in mysql, if theres a new row.. it processes it in the mainframe.. the processing etc is no issue.. thats working..
what i want is
how can i do a validation after the submit button is pressed,, validate if fields are <> "" and if some fields are numeric
then.. and here comes my unexperiance
the code i use now opens the php page,, and that page says processing.. i do not want that page to be opened.. i want the word "processing"to be displayed on the same page where the details where entered..
thats question 1
second question...
once the submit button has been pressed,, the vb app on the webserver does the updating.. that vb app will post a result on the same row.. it could be the updates on the mainframe failed... i want the html page to wait when that results field, e.g. "failed" has been updated by the vb app.. a sort of wait function i guess..
i hope i explained sufficiently, and want to thank on forehand the time you put in this.
please be precise in youre reply, like put this there etc, ( i regret not to have learned html for the last 7 years
)
best regards
sander
i have been able to create a simple form page :
<html>
<h1>Open New RPA trace</h1>
<form action="addrpa.php" method="post">
<title>Open New RPA
</title>
<table>
<tr><td>Airwaybill</td>
<td><input type="text" name="awb"></td></tr>
<tr><td>Youre ID</td>
<td><input type="text" name="id"></td></tr>
<tr><td>Youre Station</td>
<td><input type="text" name="station"></td></tr>
<tr><td>Youre Phone nbr </td>
<td><input type="text" name="phn"></td></tr>
<tr><td>Youre Country </td>
<td><input type="text" name="cty"></td></tr>
<tr><td>Queue To Station</td>
<td><input type="text" name="q"></td></tr>
<tr><td>Text for Trace</td>
<td><input type="text" name="trace"></td></tr>
</table>
<input type="submit" value="submit">
</form>
</html>
and php for handle store in mysql :
<?
$awb=$_POST['awb'];
$id=$_POST['id'];
$station=$_POST['station'];
$phn=$_POST['phn'];
$cty=$_POST['cty'];
$q=$_POST['q'];
$trace=$_POST['trace'];
$connection=mysql_connect("localhost", "mokum", "mokum");
mysql_select_db("rpa", $connection);
$results=mysql_query("INSERT INTO input (nmbr, awb, id, station, phn, cty, q, trace)
VALUES ('$nmbr', '$awb', '$id', '$station', '$phn', '$cty', '$q', '$trace')") or
die('Error making query');
echo'Processing';
?>
this took me 8 hours,, lol
what i want is
how can i do a validation after the submit button is pressed,, validate if fields are <> "" and if some fields are numeric
then.. and here comes my unexperiance
the code i use now opens the php page,, and that page says processing.. i do not want that page to be opened.. i want the word "processing"to be displayed on the same page where the details where entered..
thats question 1
second question...
once the submit button has been pressed,, the vb app on the webserver does the updating.. that vb app will post a result on the same row.. it could be the updates on the mainframe failed... i want the html page to wait when that results field, e.g. "failed" has been updated by the vb app.. a sort of wait function i guess..
i hope i explained sufficiently, and want to thank on forehand the time you put in this.
please be precise in youre reply, like put this there etc, ( i regret not to have learned html for the last 7 years
best regards
sander