JeRRy wrote:
Okay I have the emails to work now, thanks so much Chris. But now I
have encountered another problem, I hope you don't mind helping, I am
obviously missing again something basic. Basic than before.
I have this code:
$result = mysql_query("SELECT `nickname` FROM tipping
WHERE 1
ORDER BY `score`
DESC LIMIT 0, 30",$db);
while ($myrow = mysql_fetch_row($result)) {
printf("
<br><input type=text name=username[$a] value=%s> <br>",
$myrow[0]);
}
?>
which displays all the users names.
than I want to push it to another page that tells the db to update, one
username per record. Code below:
$query = "insert into round3 SET username='$username[$a]'";
mysql_query("$query");
echo(" ");
}
else {echo("Ooops, something bad happened! Please try again
shortly.");}
?>
<a href="admin.php">BACK</a>
<input type="submit" value="submit">
</form>
</p>
But when I check the db this is what I get.
A new record created but username is blank.
Where is $username[$a] meant to come from? You don't show enough code
about this to work out why.
Are you posting the results? Are you getting it from a select box? other
... ?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php