How to display data from drop down list html

Halo Friends,

How to echo result data from drop down list ? I made it like this

[php]

Choose Your Job

- Job - <?php include 'connect.php'; $sql = mssql_query("select distinct(vcompanyname), icustomerid from saleswork"); while ($row1= mssql_fetch_array($sql)){ echo "$row1[0]"; } ?> <?php echo $_POST['company']; ?>

[/php]

I’m having trouble with echo $_POST[‘company’]; the result was not complete.
example : If the company name is “Wahana Artha Harsaka” it’ll only appear “Wahana

thank you for your help

Easy… Your select line:
echo “$row1[0]”;
Let’s say the value of $row[0] is “Wahana Artha Harsaka” as in your example.

The results would look like this:

Wahana Artha Harsaka

when it should look like this:
Wahana Artha Harsaka

Just need to add some quotes around your value… Do it this way:
echo “$row1[0]”;

That will work for you. Good luck!

untungik did not reply anymore. But I tried this one and it works.
Thanks ErnieAlex

Sponsor our Newsletter | Privacy Policy | Terms of Service