bbvic
asked on
syntax
I am tring to make on htmlwrite(" ");
how to make correct syntax for
$querycomp = "Select * from customer order by custid ASC";
$resultcomp = mysql_query($querycomp);
$count=0;
while($row = mysql_fetch_array($resultc omp)){
$count++;
echo "<option value>".$row['company']."< /option>";
}
to put into htmlwrite(" ");
Thank you in advance
-------------------------- ------
htmlwrite("
<a href=\"admin.php\">return to overview</a>
<form name=\"form1\" method=\"post\" action=\"user.php?action=a dduserconf irmed\">
<p>Username: <input name=\"ADD_username\" type=\"text\" id=\"ADD_Username\"><br>
Password: <input name=\"ADD_password\" type=\"text\" id=\"ADD_password\"><br>
First Name : <input name=\"ADD_fname\" type=\"text\" id=\"ADD_fname\"><br>
Last Name : <input name=\"ADD_lname\" type=\"text\" id=\"ADD_lname\"><br>
E-mail : <input name=\"ADD_mailadres\" type=\"text\" id=\"ADD_mailadres\"><br>
Company : <select name=\"ADD_company\" type=\"text\" id=\"ADD_company\"> ");
$querycomp = "Select * from customer order by custid ASC";
$resultcomp = mysql_query($querycomp);
$count=0;
while($row = mysql_fetch_array($resultc omp)){
$count++;
echo "<option value>".$row['company']."< /option>";
}
htmlwrite("
</select><br>
Phone : <input name=\"ADD_phone\" type=\"text\" id=\"ADD_phone\"><br>
Userlevel: <input name=\"ADD_Userlevel\" type=\"text\" id=\"ADD_Userlevel\" value=\"1\"><br>
<input name=\"ADD_activated\" type=\"checkbox\" value=\"1\" checked>Activate on create<br>
<input name=\"ADD_MailActnum\" type=\"checkbox\" value=\"1\">Mail activationcode mail (only for unactivated accounts).
<br>
<input type=\"submit\" value=\"ADD USER\"></p></form>","ADD USER");
how to make correct syntax for
$querycomp = "Select * from customer order by custid ASC";
$resultcomp = mysql_query($querycomp);
$count=0;
while($row = mysql_fetch_array($resultc
$count++;
echo "<option value>".$row['company']."<
}
to put into htmlwrite(" ");
Thank you in advance
--------------------------
htmlwrite("
<a href=\"admin.php\">return to overview</a>
<form name=\"form1\" method=\"post\" action=\"user.php?action=a
<p>Username: <input name=\"ADD_username\" type=\"text\" id=\"ADD_Username\"><br>
Password: <input name=\"ADD_password\" type=\"text\" id=\"ADD_password\"><br>
First Name : <input name=\"ADD_fname\" type=\"text\" id=\"ADD_fname\"><br>
Last Name : <input name=\"ADD_lname\" type=\"text\" id=\"ADD_lname\"><br>
E-mail : <input name=\"ADD_mailadres\" type=\"text\" id=\"ADD_mailadres\"><br>
Company : <select name=\"ADD_company\" type=\"text\" id=\"ADD_company\"> ");
$querycomp = "Select * from customer order by custid ASC";
$resultcomp = mysql_query($querycomp);
$count=0;
while($row = mysql_fetch_array($resultc
$count++;
echo "<option value>".$row['company']."<
}
htmlwrite("
</select><br>
Phone : <input name=\"ADD_phone\" type=\"text\" id=\"ADD_phone\"><br>
Userlevel: <input name=\"ADD_Userlevel\" type=\"text\" id=\"ADD_Userlevel\" value=\"1\"><br>
<input name=\"ADD_activated\" type=\"checkbox\" value=\"1\" checked>Activate on create<br>
<input name=\"ADD_MailActnum\" type=\"checkbox\" value=\"1\">Mail activationcode mail (only for unactivated accounts).
<br>
<input type=\"submit\" value=\"ADD USER\"></p></form>","ADD USER");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, it's good to learn to do it the manual way, but once you've got the hang of it, look at the EzSQL class here: http://php.justinvincent.com/ it makes everything so much easier and saves you writing the same 100 lines of code every time you want to use a database