Jump to content

[SOLVED] Setting up HTML in PHP echo


$username

Recommended Posts

Here is my revised code

 

echo ("<td><select name=\"WebCaseTypeSet\">".$no_opt. "</option>" .$yes_opt. "</option></select><big></big></td>");

 

I also have this that is doing to MYSQL work

 

$sql202 = "SELECT WebID, WebCasesType, WebCaseTypeSet FROM webdisplay";
$query202 = mysql_query($sql202);
while($row202 = mysql_fetch_array($query202)) {
$no_opt = '<option value="No" ';
$yes_opt = '<option value="Yes" ';
if ($row202["WebCaseTypeSet"] == "No") 
     $no_opt .= 'selected=selected';
else
     $yes_opt .= 'selected=selected';

$no_opt .= '>';
$yes_opt .= '>';

you should try to indent your html so that you can easily see your mistakes

 

echo "<td>
	<select name=\"WebCaseTypeSet\">
		".$no_opt. "</option>
		" .$yes_opt. "</option>
	</select>
	<big></big>
</td>";

 

That clearly isnt correct html formatting. You do not have opening tags for your options. and is big a tag?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.