Jump to content

[SOLVED] unexpected T_STRING, expecting ',' or ';' in a form...


pescott

Recommended Posts

Hello all, could use your help on this one:

 

I have a form that needs validation. There is no problem in that, you may see cheks that do not the values of the variables, but that is not so important right now. The problem is the dynamic pulldown menu, which fails to show on the page.

When I remove that particular section, the page loads perfectly, so I know the error is in there somewhere.

 

<form action="" method="post">
<tr>
<?php
//If checkboxes, radio buttons, or drop-down selections have been selected,
//this sets them to be pre-selected on the next screen.
if (isset($HTTP_POST_VARS["submit1"]) || isset($HTTP_POST_VARS["submit2"])){
$check1=""; $check2=""; $check3=""; $check4=""; $check5=""; $check6=""; $check7=""; $check8=""; $check9=""; $check10=""; $check11=""; $check12=""; $check13=""; $check14=""; $check15=""; $check16=""; 
if (isset($HTTP_POST_VARS["iagree"]))
	$check1=" checked";
if (isset($HTTP_POST_VARS["emailme"]))
	$check2=" checked";
if ($HTTP_POST_VARS["geslacht"]=="vrouw")
	$check15=" checked";
else
	$check14=" checked";
if ($HTTP_POST_VARS["beroepsgroep"]=="apothekers")
	$check3=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="artsen")
	$check4=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="fysiotherapeuten")
	$check5=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="gz-psychologen")
	$check6=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="psychotherapeuten")
	$check7=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="tandartsen")
	$check8=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="verloskundigen")
	$check9=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="verpleegkundigen")
	$check10=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="student geneeskunde")
	$check16=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="niet geregistreerd")
	$check11=" selected";
else
	$check12=" selected";
}

//Final submit page.  If all fields are filled out and validate, display.
if (isset($HTTP_POST_VARS["submit2"]) && $error==""){
echo"<td>
<p>Bedankt voor uw bericht! We nemen zo spoedig mogelijk contact met u op. <strong>$recordcount</strong></p>
Klik <a href=\"contact.php\">hier</a> om terug te gaan naar het begin.
</td>
</tr>";
}

//If all fields are not filled out or do not validate, display errors and allow
//for correction and resubmittion.
else{
echo"
<tr>
<td id=\"else_td\">
";
if($error!="")
echo"<p style=\"color:#ff0000;\">$error</p>";
elseif(isset($HTTP_POST_VARS["submit1"]))
echo"<p><strong>Controleert u uw informatie alstublieft voor verzending:</strong></p>";
echo"<table id=\"subtable\">
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Voorletters:</td>
	<td></td>
	<td><input tabindex=\"1\" size=\"45\" type=\"text\" name=\"voorletters\" value=\"$voorletters\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Tussenvoegsel:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Bijv. de, van, van der, etc.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"2\" size=\"45\" type=\"text\" name=\"voorvoegsel\" value=\"$voorvoegsel\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Achternaam:</td>
	<td></td>
	<td><input tabindex=\"3\" size=\"45\" type=\"text\" name=\"achternaam\" value=\"$achternaam\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Geslacht:</td>
	<td></td>
	<td><input tabindex=\"4\" size=\"30\" type=\"radio\" name=\"geslacht\" value=\"man\" $check14/> Man <input tabindex=\"5\" size=\"30\" type=\"radio\" name=\"geslacht\" value=\"vrouw\" $check15/> Vrouw</td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Straat:</td>
	<td></td>
	<td><input tabindex=\"6\" size=\"45\" type=\"text\" name=\"straat\" value=\"$straat\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Huisnummer:</td>
	<td></td>
	<td><input tabindex=\"7\" size=\"45\" type=\"text\" name=\"huisnummer\" value=\"$huisnummer\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Huisnummer toevoeging:</td>
	<td></td>
	<td><input tabindex=\"8\" size=\"45\" type=\"text\" name=\"toevoeging\" value=\"$toevoeging\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Postcode:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('De postcode vult u in volgens dit sjabloon:<br><b>0000 AA</b>.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"9\" size=\"45\" type=\"text\" name=\"postcode\" value=\"$postcode\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Woonplaats:</td>
	<td></td>
	<td><input tabindex=\"10\" size=\"45\" type=\"text\" name=\"woonplaats\" value=\"$woonplaats\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Telefoonnummer:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Vul in het eerste veld het netnummer in, daarna het abonneenummer.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"11\" size=\"8\" type=\"text\" name=\"netnummer\" value=\"$netnummer\" /> - <input tabindex=\"12\" size=\"29\" type=\"text\" name=\"abonnee\" value=\"$abonnee\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Onderwerp:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Indien u een vraag hebt over een object uit ons aanbod, maakt u dan een keuze uit de lijst.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td>
$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";
	if ($result = mysql_query($sql) && mysql_num_rows($result)) {
    	echo "<select tabindex=\"12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row[id]}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />E-mailadres:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Wanneer u die optie onderaan selecteert, wordt een kopie van uw bericht naar dit e-mailadres gestuurd.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"13\" size=\"45\" type=\"text\" name=\"emailadres\" value=\"$emailadres\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Uw bericht:</td>
	<td></td>
	<td><textarea tabindex=\"14\" cols=\"53\" rows=\"7\" name=\"bericht\">".$HTTP_POST_VARS["bericht"]."</textarea></td>
</tr>
<tr>
	<td id=\"contd\" colspan=\"3\"><h3 id=\"onderteken\">Verstuur een bericht:</h3>
		<input tabindex=\"15\" size=\"30\" type=\"checkbox\" name=\"iagree\" value=\"iagree\"$check13> <img src=\"i/cvb01_star_sm.gif\" />Ik ga akkoord met de <a href=\"disclaimer.php\" target=\"_blank\">algemene voorwaarden</a>.<br />
		<input tabindex=\"16\" size=\"30\" type=\"checkbox\" name=\"emailme\" value=\"emailme\"$check2> <img src=\"i/cvb01_horizontalspace.gif\" />Stuur mij een bevestigingsbericht.
	</td>
</tr>
<tr>
	<td id=\"submit\" colspan=\"3\">";
	if ((isset($HTTP_POST_VARS["submit1"]) && $error!="") || (isset($HTTP_POST_VARS["submit2"]) && $error!=""))
		echo"<p style=\"color:#ff0000;\">Herstelt u alstublieft de gevonden fouten en verstuurt u de informatie dan nogmaals:<br />
		<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit1\"></div></p>";
	elseif (isset($HTTP_POST_VARS["submit1"]))
		echo"<p style=\"font-weight:bold;\">Klopt de bovenstaande informatie? Zo nee, brengt u dan uw wijzigingen aan. Zo ja, klikt u dan op de onderstaande knop om te versturen:<br />
		<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit2\"></div></p>";
	else
		echo"<p>Velden gemarkeerd met een <img src=\"i/cvb01_star_sm.gif\" /> zijn verplicht.<br />
<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit1\"> <input tabindex=\"18\" type=\"reset\" value=\"Leegmaken\"></div></p>";
echo	"</td>
</tr>
</table>";
}

?>
</td>
</tr>
</form>

 

The error I receive is this:

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/httpd/vhosts/pescott.nl/subdomains/carelvb/httpdocs/contact.php on line 412

 

Line 412 is this line:

$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";

 

Any suggestions on how to fix this error?

Link to comment
Share on other sites

I did that before, but then the HTML shows an empty <td></td>

 

<tr>

<td id="contd"><img src="i/cvb01_horizontalspace.gif" />Onderwerp:</td>

<td><a href="#" class="hintanchor" onMouseover="showhint('Indien u een vraag hebt over een object uit ons aanbod, maakt u dan een keuze uit de lijst.', this, event, '242px')"><img src="i/cvb01_information.gif" /></a></td>

<td></td>

</tr>

<tr>

<td id="contd"><img src="i/cvb01_star_sm.gif" />E-mailadres:</td>

<td><a href="#" class="hintanchor" onMouseover="showhint('Wanneer u die optie onderaan selecteert, wordt een kopie van uw bericht naar dit e-mailadres gestuurd.', this, event, '242px')"><img src="i/cvb01_information.gif" /></a></td>

<td><input tabindex="13" size="45" type="text" name="emailadres" value="" /></td>

</tr>

 

So how to generate the correct dynamic pulldown menu?

Link to comment
Share on other sites

Are you serious? You can't edit 2 characters in that yourself? nikefido told you what to do.

 

Here:

<form action="" method="post">
<tr>
<?php
//If checkboxes, radio buttons, or drop-down selections have been selected,
//this sets them to be pre-selected on the next screen.
if (isset($HTTP_POST_VARS["submit1"]) || isset($HTTP_POST_VARS["submit2"])){
$check1=""; $check2=""; $check3=""; $check4=""; $check5=""; $check6=""; $check7=""; $check8=""; $check9=""; $check10=""; $check11=""; $check12=""; $check13=""; $check14=""; $check15=""; $check16=""; 
if (isset($HTTP_POST_VARS["iagree"]))
	$check1=" checked";
if (isset($HTTP_POST_VARS["emailme"]))
	$check2=" checked";
if ($HTTP_POST_VARS["geslacht"]=="vrouw")
	$check15=" checked";
else
	$check14=" checked";
if ($HTTP_POST_VARS["beroepsgroep"]=="apothekers")
	$check3=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="artsen")
	$check4=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="fysiotherapeuten")
	$check5=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="gz-psychologen")
	$check6=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="psychotherapeuten")
	$check7=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="tandartsen")
	$check8=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="verloskundigen")
	$check9=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="verpleegkundigen")
	$check10=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="student geneeskunde")
	$check16=" selected";
elseif ($HTTP_POST_VARS["beroepsgroep"]=="niet geregistreerd")
	$check11=" selected";
else
	$check12=" selected";
}

//Final submit page.  If all fields are filled out and validate, display.
if (isset($HTTP_POST_VARS["submit2"]) && $error==""){
echo"<td>
<p>Bedankt voor uw bericht! We nemen zo spoedig mogelijk contact met u op. <strong>$recordcount</strong></p>
Klik <a href=\"contact.php\">hier</a> om terug te gaan naar het begin.
</td>
</tr>";
}

//If all fields are not filled out or do not validate, display errors and allow
//for correction and resubmittion.
else{
echo"
<tr>
<td id=\"else_td\">
";
if($error!="")
echo"<p style=\"color:#ff0000;\">$error</p>";
elseif(isset($HTTP_POST_VARS["submit1"]))
echo"<p><strong>Controleert u uw informatie alstublieft voor verzending:</strong></p>";
echo"<table id=\"subtable\">
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Voorletters:</td>
	<td></td>
	<td><input tabindex=\"1\" size=\"45\" type=\"text\" name=\"voorletters\" value=\"$voorletters\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Tussenvoegsel:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Bijv. de, van, van der, etc.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"2\" size=\"45\" type=\"text\" name=\"voorvoegsel\" value=\"$voorvoegsel\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Achternaam:</td>
	<td></td>
	<td><input tabindex=\"3\" size=\"45\" type=\"text\" name=\"achternaam\" value=\"$achternaam\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Geslacht:</td>
	<td></td>
	<td><input tabindex=\"4\" size=\"30\" type=\"radio\" name=\"geslacht\" value=\"man\" $check14/> Man <input tabindex=\"5\" size=\"30\" type=\"radio\" name=\"geslacht\" value=\"vrouw\" $check15/> Vrouw</td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Straat:</td>
	<td></td>
	<td><input tabindex=\"6\" size=\"45\" type=\"text\" name=\"straat\" value=\"$straat\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Huisnummer:</td>
	<td></td>
	<td><input tabindex=\"7\" size=\"45\" type=\"text\" name=\"huisnummer\" value=\"$huisnummer\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Huisnummer toevoeging:</td>
	<td></td>
	<td><input tabindex=\"8\" size=\"45\" type=\"text\" name=\"toevoeging\" value=\"$toevoeging\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Postcode:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('De postcode vult u in volgens dit sjabloon:<br><b>0000 AA</b>.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"9\" size=\"45\" type=\"text\" name=\"postcode\" value=\"$postcode\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Woonplaats:</td>
	<td></td>
	<td><input tabindex=\"10\" size=\"45\" type=\"text\" name=\"woonplaats\" value=\"$woonplaats\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />Telefoonnummer:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Vul in het eerste veld het netnummer in, daarna het abonneenummer.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"11\" size=\"8\" type=\"text\" name=\"netnummer\" value=\"$netnummer\" /> - <input tabindex=\"12\" size=\"29\" type=\"text\" name=\"abonnee\" value=\"$abonnee\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Onderwerp:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Indien u een vraag hebt over een object uit ons aanbod, maakt u dan een keuze uit de lijst.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td>";
$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";
	if ($result = mysql_query($sql) && mysql_num_rows($result)) {
    	echo "<select tabindex="12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row[id]}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_star_sm.gif\" />E-mailadres:</td>
	<td><a href=\"#\" class=\"hintanchor\" onMouseover=\"showhint('Wanneer u die optie onderaan selecteert, wordt een kopie van uw bericht naar dit e-mailadres gestuurd.', this, event, '242px')\"><img src=\"i/cvb01_information.gif\" /></a></td>
	<td><input tabindex=\"13\" size=\"45\" type=\"text\" name=\"emailadres\" value=\"$emailadres\" /></td>
</tr>
<tr>
	<td id=\"contd\"><img src=\"i/cvb01_horizontalspace.gif\" />Uw bericht:</td>
	<td></td>
	<td><textarea tabindex=\"14\" cols=\"53\" rows=\"7\" name=\"bericht\">".$HTTP_POST_VARS["bericht"]."</textarea></td>
</tr>
<tr>
	<td id=\"contd\" colspan=\"3\"><h3 id=\"onderteken\">Verstuur een bericht:</h3>
		<input tabindex=\"15\" size=\"30\" type=\"checkbox\" name=\"iagree\" value=\"iagree\"$check13> <img src=\"i/cvb01_star_sm.gif\" />Ik ga akkoord met de <a href=\"disclaimer.php\" target=\"_blank\">algemene voorwaarden</a>.<br />
		<input tabindex=\"16\" size=\"30\" type=\"checkbox\" name=\"emailme\" value=\"emailme\"$check2> <img src=\"i/cvb01_horizontalspace.gif\" />Stuur mij een bevestigingsbericht.
	</td>
</tr>
<tr>
	<td id=\"submit\" colspan=\"3\">";
	if ((isset($HTTP_POST_VARS["submit1"]) && $error!="") || (isset($HTTP_POST_VARS["submit2"]) && $error!=""))
		echo"<p style=\"color:#ff0000;\">Herstelt u alstublieft de gevonden fouten en verstuurt u de informatie dan nogmaals:<br />
		<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit1\"></div></p>";
	elseif (isset($HTTP_POST_VARS["submit1"]))
		echo"<p style=\"font-weight:bold;\">Klopt de bovenstaande informatie? Zo nee, brengt u dan uw wijzigingen aan. Zo ja, klikt u dan op de onderstaande knop om te versturen:<br />
		<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit2\"></div></p>";
	else
		echo"<p>Velden gemarkeerd met een <img src=\"i/cvb01_star_sm.gif\" /> zijn verplicht.<br />
<div align=\"right\"><input tabindex=\"17\" type=\"submit\" value=\"Versturen\" name=\"submit1\"> <input tabindex=\"18\" type=\"reset\" value=\"Leegmaken\"></div></p>";
echo	"</td>
</tr>
</table>";
}

?>
</td>
</tr>
</form>

Link to comment
Share on other sites

Umm, yeah, Ken2k7, of course I got that. That's how I ended up with the empty <td>.

 

The problem is generating the dynamic pulldown in there. Apparently there is something wrong with that. So, going back to my first post, the menu not showing is my main issue...

 

Suggestiosn greatly appreciated!

Link to comment
Share on other sites

Ken2k7,

 

That would be this part (or so I hope :)

	<td>
$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";
	if ($result = mysql_query($sql) && mysql_num_rows($result)) {
    	echo "<select tabindex="12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row[id]}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>

 

Thanks for your help!

Link to comment
Share on other sites

True; I selected from this thread in the code above instead of from the altered text editor file :)

Moronic me!

	<td>";
$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";
	if ($result = mysql_query($sql) && mysql_num_rows($result)) {
    	echo "<select tabindex="12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row[id]}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>

Is the real thing

Link to comment
Share on other sites

Try changing:

	
<td>";
$sql="SELECT * FROM ‘objects’ ORDER BY ‘straat’ ASC";
	if ($result = mysql_query($sql) && mysql_num_rows($result)) {
    	echo "<select tabindex="12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row[id]}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>

 

To this:

	<td>";
$sql="SELECT * FROM objects ORDER BY straat ASC";
$result = mysql_query($sql) or die(mysql_error());
	if ($result && mysql_num_rows($result)) {
    	echo "<select tabindex="12\" name=\"onderwerp\">";
	while ($row = mysql_fetch_assoc($result)) {
      	echo "<option value=\"{$row['id']}\">'".$row["straat"]." ".$row["nummer"].", ".$row["plaatsnaam"]."'</option>";
	}
    	echo "</select>";
}
	echo "</td>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.