Hi,
Im total new in PHP and HTMl programming - any help will be welcome
What Im trying to do is
I have a main.html file with form on the form there is one button and the code is as follow:
<INPUT type="button" class="buttons" value="Add Stuff"
onClick="window.open('AddStuff.php','New Stuff', 'width=100%,height=100%')">
Now what I want to happen is that AddStuff.php will contain both html form and php code that
will validate Form fields before inserting the values to MySQL
My problem is how the php file should be build
is it :
<?php
do some PHP validations here and if OK send to the SQL DB
>
<html>
<head>
head stuff
</head>
<body>
<form name="newStuff" action="AddStuff.php" method="post" onSubmit="return validateNewStuffForm()">
...form stufff ....
</form>
</body>
</html>
if I put it this way the php stuff is called also when I open the window
Please help in how to arange the php file in a way that :
1) html file will be opened
2) form will be filled
3) php procedures on the same file will called
4) How do I close the window when php procedures were done successfully
Thanks in advance for all your help
T