FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » PHP/SQL help needed....
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
PHP/SQL help needed.... [message #32846] Wed, 26 July 2006 17:52 Go to next message
jack12345 is currently offline  jack12345   Croatia
Messages: 1
Registered: July 2006
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Ok i have a minor problem. I have a drop down list which i use for entering info in a database.

<select>
<?php

$options = array('Jack', 'Jane', 'Irene', 'Marry', 'Jody', 'Ana', 'Ivana');
foreach ($options as $option) {
    $isSelected = $option == $name ? ' selected' : '';
    print "<option$isSelected>$option</option>\n";
}

?>
</select>


Now what i'd need is to instead of inserting Irene, Marry ... in the database i need to change it to insert html code per example <a href="http://somename.com/something>Irene</a>. But can't seem to modify it to do that so any help would be appreciated.
Re: PHP/SQL help needed.... [message #34253 is a reply to message #32846] Mon, 16 October 2006 08:27 Go to previous message
sBForum is currently offline  sBForum   Jordan
Messages: 5
Registered: October 2006
Location: Jordan
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

i think as i've understood .. that u want to change the database entry to be a HTML code surrounding the name .. if that's right , then u should put the HTML code u want in the SQL query using PHP and HTML to print it ! if u want more explaining , tell me plz and i'll be pleased if u put the SQL query with it!

regards,
sBForum Razz
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Apache on local pc -> DocumentRoot on a remote nas
Next Topic: MYSQL Update error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 23 07:52:40 EDT 2017

Total time taken to generate the page: 0.00698 seconds