PHP/SQL help needed.... [message #32846] |
Wed, 26 July 2006 21:52 |
jack12345
Messages: 1 Registered: July 2006
Karma: 0
|
Junior Member |
|
|
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 12:27 |
|
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
|
|
|