GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Aug-2004, 04:42
skyloon skyloon is offline
Junior Member
 
Join Date: Jun 2003
Posts: 53
skyloon is an unknown quantity at this point

text, list box...


the value can be showed in text box, but can’t show in the list box…
how to show the value in the list box???
thanks...

text box
PHP Code:

<input maxlength=40 size=40 name=fullname value="<? mysql_select_db($database, $conn);
        $result=mysql_query("select * from ".$DBprefix."signup where username = '$nickname'") ;
                $number_of_array = mysql_num_rows($result);
        while ($number_of_array = mysql_fetch_array($result)){
        echo "$number_of_array[fullname]"; 
        }                
?>"> 




list box
PHP Code:

<select name=status>
          <option value="" selected>Prefer undisclosed</option>
          <option value="Single" <?php if(isset($status)&&$status=='Single'){echo('selected');} ?>>Single</option>
          <option value="Living together" <?php if(isset($status)&&$status=='Living together'){echo('selected');} ?>>Living together</option>
          <option value="Married" <?php if(isset($status)&&$status=='Married'){echo('selected');} ?>>Married</option>
          <option value="Separated" <?php if(isset($status)&&$status=='Separated'){echo('selected');} ?>>Separated</option>
          <option value="Divorced" <?php if(isset($status)&&$status=='Divorced'){echo('selected');} ?>>Divorced</option>
          <option value="Widowed" <?php if(isset($status)&&$status=='Widowed'){echo('selected');} ?>>Widowed</option>
</select> 

Last edited by JdS : 27-Aug-2004 at 07:11. Reason: Please insert your example PHP codes between [php] and [/php] tags
  #2  
Old 30-Aug-2004, 00:42
skyloon skyloon is offline
Junior Member
 
Join Date: Jun 2003
Posts: 53
skyloon is an unknown quantity at this point
Question

i've tried this on my own pc, it works....
when i upload to my web host, it doesn't work....
any problems???

Code:
<? echo'<a class=hp href=edit.php?education='.urlencode($row[education]).'>Edit Profile</a>';?>

Code:
<select name=education> <option value="" selected>Prefer undisclosed</option> <option value="High School"<?php if(isset($education)&&$education=='High School'){echo('selected');} ?>>High School</option> <option value="College"<?php if(isset($education)&&$education=='College'){echo('selected');} ?>>College</option> <option value="Bachelor"<?php if(isset($education)&&$education=='Bachelor'){echo('selected');} ?>>Bachelor</option> <option value="Master"<?php if(isset($education)&&$education=='Master'){echo('selected');} ?>>Master</option> <option value="PhD"<?php if(isset($education)&&$education=='PhD'){echo('selected');} ?>>PhD</option> <option value="Other"<?php if(isset($education)&&$education=='Other'){echo('selected');} ?>>Other</option> </select>
 

Recent GIDBlogPrepping for deployment by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 15:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
[CONTEST?]Data Structure Test dsmith C Programming Language 2 06-Jun-2004 15:13
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28
text field problm zuzupus Web Design Forum 3 04-Sep-2003 05:18

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:45.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.