I am very new to HTML and PHP and can not figure out how to separate them properly.
<html>
$data = mysql_query("SELECT * FROM deviation")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
Print "<tr>";
<input type="radio" name="chassi" value=<?php $info['chassi']/> $info['chassi']
<br />
}
<html>
This is as you might see a wild mix of PHP and HTML code. It is in a HTML form. I want to use the PHP while loop but at the same time use the HTML input. How do I do?
Thanks in advance!
You need to add php tags!
Add a
<?phpand a?>at the start and end of any php code!For example you would write something like this:
To fix your code you should try:
To clear up from comment below:
To add these together you must use
<?phpat the start then?>at the end of any PHP. Perhaps its worth reading the PHP manual here