Re: grabbing data and auto email set users

From: Date: Tue, 11 Apr 2006 00:20:30 +0000
Subject: Re: grabbing data and auto email set users
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-41689@lists.php.net to get a copy of this message
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/

« previous php.db (#41689) next »