?id=2

how you do this?

Page 1 of 1

1 Replies - 1400 Views - Last Post: 01 April 2005 - 10:14 AM Rate Topic: -----

#1 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

?id=2

Posted 01 April 2005 - 08:43 AM

ok, so i have a database (mysql) and i want it so when you click on one of the images i will have it link to mobile.php?id=2 and it brings up the larger image and the specs for the phone. i just dont know how to do this... can someone help me out?
Is This A Good Question/Topic? 0
  • +

Replies To: ?id=2

#2 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

Re: ?id=2

Posted 01 April 2005 - 10:14 AM

hey i figured this out too. i used DWMX2004 to do it, i dont know if it is the best way so just tell me if it good or not...
<?php require_once('Connections/conn.php'); ?>
<?php
$colname_Recordset1 = "1";
if (isset($_GET['id'])) {
  $colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_conn, $conn);
$query_Recordset1 = sprintf("SELECT * FROM ll_phones WHERE id = %s", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
Make: <?php echo $row_Recordset1['company']; ?>
<br>
Cell Phone Name: <?php echo $row_Recordset1['name']; ?><br>
<img src="<?php echo $row_Recordset1['image']; ?>"><br>
Specs:<br>
<?php echo $row_Recordset1['specs']; ?></body>
</html>
<?php
mysql_free_result($Recordset1);
?>


you can veiw it here. http://www.bluntedby...line/mobile.php

This post has been edited by iamcenz: 01 April 2005 - 10:15 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1