"Its Me" <[EMAIL PROTECTED]> wrote in message
> i have the file:
> edit_profile.php

Just curious: why do you have May 15th
and October 6th listed as locations?


if (!isset($location))
    $location = "";

$locations[] = array(
    "" => "Choose City",
    "Abou Redes" => "Abou Redes",
    "Abou-Zabal" => "Abou-Zabal",
    "Al Arish" => "Al Arish",
    "Al Mahala" => "Al Mahala",
// ... etc, etc...
    "Zafrana" => "Zafrana",
    "Zagazik" => "Zagazik"

echo "\n<select name='location'>";

foreach($locations as $value => $text)
            .($location == $value ? " selected" : "")
            ." value='$value'>"

echo "\n</select>";



1.  That is a pretty God-awful long list; is there
any way to subdivide it logically?  Maybe use a pair
of Javascript-coupled selection-boxes - use
the first box to specify the first letter of the desired
name, then the second box provides (a much shorter
list of) all destinations beginning with that letter.

2.  If your option-value and option-text are
always identical, there is no need to specify
the value separately (it defaults to the text).

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to