i know how to get datas from a form and use them.
i mean when u want to interact with users u can code a form where u get data (name, birth...) and u can then use that.
differently i cannot figure it out how i can use mouse click to get url.
i try to explain myself:
i want to make links (href) getting the values of this links from a db.
imagine to have a html tables with some words:
apple pear orange strawberry
grape
and all these are the headline of my news. to read the whole news u click the headline u are interested to.
the question is:
what should i do to get the value of the url on the fly? i think i need a template page where by php is automatically printed the requested news.
tnx for help
url on the fly
Moderator: General Moderators
solved:
Code: Select all
<td><a name="newspost_nr_1"></a><a href="http://localhost/spazioweb/specialita/richiesto.php?id=9">Dal mare un aiuto per il cuore malato</a></td></tr>
Code: Select all
select id, titolo, testo, argomenti from $table_name where id like '$_GET[id]%'
";
while ($riga = mysql_fetch_array($result)) {
echo "<tr class=\"GridRow\"
onmouseover=\"this.className='GridMOverRow'\"
onmouseout=\"this.className='GridRow'\" id=\"ggg\">";
$id .= $riga['id'];
$testo .= $riga['testo'];
$titolo .= $riga['titolo'];
echo "<tr class=\"GridHeader\"><td>$titolo</td></tr>";
echo "<tr class=\"GridRow\"
onmouseover=\"this.className='GridMOverRow'\"
onmouseout=\"this.className='GridRow'\" id=\"ggg\"><td>$testo</td></tr>";
;
tnx for help,
pacho