okay... hmmm. i'm still a bit unsure of how to use this...
is the logic here
if ($numArtist !=0)
{
while ($rowArtist = mysql_fetch_array($resultArtist))
{
$id = $rowArtist ["id"];
}
}
supposed to replace the logic at the first part here?
if (mysql_num_rows($artist_ids) < 1) {
// NO RECORDS
$display_block .= "<p><em>Sorry, no artists exist to select!</em></p>
<p>Please <a href=\"addartist.php\">go add the Artists first</a>, then come back and
add the Concert Date</p>";
} else {
$display_block = "<h1>Add a Date:</h1>
<form method=\"post\" action=\"$_SERVER[PHP_SELF]\" >
<p><strong>Headliner:</strong>
<br />
<select name=\"artist_id1\">
<option value=\"\">-- Select Headliner --</option>";
while ($recs1 = mysql_fetch_array($artist_ids)) {
$artist_id1 = $recs1['artist_id'];
$artist_name1 = stripslashes($recs1['artist_name']);
??
and how do i replicate this bit of code using the function $resultArtist = getartists(); as you've presented for me
<select name=\"artist_id1\">
<option value=\"\">-- Select Headliner --</option>";
while ($recs1 = mysql_fetch_array($artist_ids)) {
$artist_id1 = $recs1['artist_id'];
$artist_name1 = stripslashes($recs1['artist_name']);
$display_block .= "<option value=\"$artist_id1\">
$artist_name1</option>";
}
$display_block .= "</select>
once i get that, i'll be home-free. i'm sorry to ask you to hold my hand through this, but i've been trying w/ it for a while and unable to get it to work... can't get past
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Apache\Apache2\htdocs\wwwroot\Crowbar\web_app\add_date.php on line 29
LINE 29 being this part in mine
if (mysql_num_rows($artist_ids) < 1) {
// NO RECORDS