DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 26, 2019, 09:40:11 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: PhP Drop Down Menu  (Read 2469 times)
0 Members and 1 Guest are viewing this topic.
brookstech
Guest
« on: October 02, 2004, 02:19:00 PM »

In writing a mod, I find myself having real tourble with getting a html drop down menu to default back to the selected value after is is called for edit.

Code:
$row = mysql_fetch_array($result);

<select name='rtype1' selected=$row[rtype] size='1'>

any thoughts?
Logged
Kendaer
Guest
« Reply #1 on: October 02, 2004, 06:42:38 PM »

Without seeing your actual code, I cannot give you anything more than very generic advice.

When you are doing a output statement in php, and using an array variable such as row as part of the output statement you either need to use concatenation
("string one " . $var['index'] . " string two") or you need to handle the variable special inside the string ("string one {$var['index']} string two").  The HTML you are outputtting to build a dropdown is just text as far as PHP is concerned, so you need to do the right thing when dealing with embedded variables.

If this doesn't help you, give more details.
Logged
brookstech
Guest
« Reply #2 on: October 02, 2004, 07:00:35 PM »

That took care of me, thanks much.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
113 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search