hi ppl!
as u can see from the title...i am making a form with HTML and PHP(well not entirely from scratch, just "innovating" it from a script i found).
The surface is done with HTML and i process the data with PHP...therefore i guess my problem here is only concerning the PHP file.
so usually if a form is only done with PHP and the data needs to be sent to MySQL: the common thing to do is set the value to post to db like this:
PHP Code:
<form name="form1" method="post" action="<?php echo $PHP_SELF; ?>">
<label for="email">E-mail:</label>
<input type="text" name="email" value="<?php echo (isset($_POST['email'])) ? $_POST['email'] : ""; ?>">
</form>
but when i am using templating system, my HTML file looks like this:
HTML Code:
<form action={action} method="post">
<td>Email</td>
<input type="text" name="email" value="{email}">
</form>
where the value is now {email}...and the corresponding .php part is:
PHP Code:
$form =array ("email"=>"");
so my problem is, how do i send this array from $form to a database??please help
thank you!
|