mysql fetch array prob (again)
Moderator: General Moderators
new problem:(
i need to make a link... but... it gives me an error...i have...
$row = mysql_fetch_array($result);
$name = $row["name"];
$mname = $row["mname"];
$dis = $row["discription"];
$dl = $row["dllink"];
(+ the other stuff you showed me to put)
so i tryed to make a link like...
<?php <a href="print $dl">print "$mname"</a> ?>
and it says error on line 38...
any help please?
i need to make a link... but... it gives me an error...i have...
$row = mysql_fetch_array($result);
$name = $row["name"];
$mname = $row["mname"];
$dis = $row["discription"];
$dl = $row["dllink"];
(+ the other stuff you showed me to put)
so i tryed to make a link like...
<?php <a href="print $dl">print "$mname"</a> ?>
and it says error on line 38...
any help please?
First change your result variable to:
Then when you want to print the link:
<a href="<?php print $row['dllink']; ?>">LINK NAME</a>
Code: Select all
$result = mysql_query("select * from maps");<a href="<?php print $row['dllink']; ?>">LINK NAME</a>
ok... i found out that i CAN use the id deal... and now i have a new question... lol im full of questions... anywayz...
i want to have multiple pages generated from 1 page(the layout page...)
i need a script so i can go to http://www.triggerhappycheaters.com/map ... 1.php?id=1
and when id changes, that changes the info that comes up for the $ statment deals...
help is much appreciated
i want to have multiple pages generated from 1 page(the layout page...)
i need a script so i can go to http://www.triggerhappycheaters.com/map ... 1.php?id=1
and when id changes, that changes the info that comes up for the $ statment deals...
help is much appreciated
Well that shouldn't be hard at all. If the table maps has a field titled ID then you should be able to do:
You should also read those tutorials I linked you to...
Code: Select all
$id = $_GETї'id']; // Put this somewhere above the declaration of $result
$result = mysql_query("select * from maps where id='$id'");think u could add me to msn or sompting? my email is ricerocket500@msn.com