drconehead2000
07-25-2008, 02:33 PM
So I am relatively new to PHP and I am trying to simply get this small bit of code to work.
<?php if ($row_rsCWGetProduct["product_TypeInput"] == 1) {
<form id="GeneralName" name="GeneralName" method="post" action="">
<label for="Name">Name:</label>
<input name="Name" type="text" id="Name" size="20" maxlength="100" />
</form>
<label for="textfield">Name</label>
<input type="text" name="textfield" id="textfield" />
}
?>
The gist is that if the vale of the first variable is 1, then the form box will display (I know that I still need to code to make it functional, but I need it to display first).
When I comment out the form bits, the page displays fine, but when they are included and the value is 1, I get the error:
Parse error: syntax error, unexpected '<'
On the 4th line down.
Can anyone help me with this simple basic question? All help is greatly appreciated.
I figured it out, moderator, you can remove this thread. Thanks
<?php if ($row_rsCWGetProduct["product_TypeInput"] == 1) {
<form id="GeneralName" name="GeneralName" method="post" action="">
<label for="Name">Name:</label>
<input name="Name" type="text" id="Name" size="20" maxlength="100" />
</form>
<label for="textfield">Name</label>
<input type="text" name="textfield" id="textfield" />
}
?>
The gist is that if the vale of the first variable is 1, then the form box will display (I know that I still need to code to make it functional, but I need it to display first).
When I comment out the form bits, the page displays fine, but when they are included and the value is 1, I get the error:
Parse error: syntax error, unexpected '<'
On the 4th line down.
Can anyone help me with this simple basic question? All help is greatly appreciated.
I figured it out, moderator, you can remove this thread. Thanks