Skip to main content
GameDev.net gamedev.net
🔒 Locked

[deleted anon]

Started by Jemburula Jan 21, 2007 at 10:24 PM 1 replies 900+ views
Original Post
Jemburula
Jemburula

[deleted anon]

What we do in life... Echoes in eternity
SimonForsman
SimonForsman
how are you storing the names and phone numbers ? (flat file, sql , etc ?)

what language do you use to generate your website ?

a simple way would be something like this in php:

<form.........><select..........><?php$dbConnection = mysql_connect("127.0.0.1","someUser","somePassword");mysql_select_db("yourDB",$dbConnection);$result = mysql_query("SELECT name FROM phonelist",$dbConnection);$rowCount = mysql_num_rows($result);for ($i=0;$i<$rowCount;$i++) {    $data = mysql_fetch_array($result);    echo "<option value=\"",$data["name"],"\">",$data["name"],"</option>";}?></select></form>


ofcourse you have to modify it to suit your database.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Jemburula
Jemburula
Oh ok nice, sorry I was so vague! After looking at that it would appear it is just what I need and will only need some basic manipulation, thankyou. Can't believe I didn't think of that lol
What we do in life... Echoes in eternity

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.