Goldfiles
01-05-2006, 02:10 PM
Here is my problem. I have a .php page where part of it is a PHP Switch Case. Then inside the php switch there is an HTML form. Well, I want to include more php inside of that html. How do I write that? I'm kinda new to php and I can't find out how to code that.
Here is what I have so far:
<?php
...Various PHP Coding...
echo ('
<fieldset>
<legend>
Update a Product
</legend>
<form method="POST" action="add.php">
ID <input type="text" name="idnum" size="4">
Name <input type="text" name="name" size="25">
Price <input type="text" name="price" size="6">
Type <select name="type">
<option value="3"><?php echo $idnum; ?>
<option value="2">Trendy
<option value="1">New
</select>
Already Sold? <select name="sold">
<option value="1">Yes
<option value="0">No
</select><br /><br />
<table><tr><td>Description</td><td><Textarea rows=5 cols=45 name="description"></Textarea></td></tr></table><br /><br />
<input type="submit" value="Submit"><input type="reset">
</form>
</fieldset>
');
?>
I used the echo (' ..... '); notation to put the HTML into my <?php ?>, but now I want to put more php into the html. How can I do this? (notice I made the problem section bold in the code)
Thanks for any help! :lovewht:
Here is what I have so far:
<?php
...Various PHP Coding...
echo ('
<fieldset>
<legend>
Update a Product
</legend>
<form method="POST" action="add.php">
ID <input type="text" name="idnum" size="4">
Name <input type="text" name="name" size="25">
Price <input type="text" name="price" size="6">
Type <select name="type">
<option value="3"><?php echo $idnum; ?>
<option value="2">Trendy
<option value="1">New
</select>
Already Sold? <select name="sold">
<option value="1">Yes
<option value="0">No
</select><br /><br />
<table><tr><td>Description</td><td><Textarea rows=5 cols=45 name="description"></Textarea></td></tr></table><br /><br />
<input type="submit" value="Submit"><input type="reset">
</form>
</fieldset>
');
?>
I used the echo (' ..... '); notation to put the HTML into my <?php ?>, but now I want to put more php into the html. How can I do this? (notice I made the problem section bold in the code)
Thanks for any help! :lovewht:
