Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,462 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,353 people online right now. Registration is fast and FREE... Join Now!




?id=2

 
Reply to this topicStart new topic

?id=2, how you do this?

iamcenz
post 1 Apr, 2005 - 07:43 AM
Post #1


You wish you were my hand!

Group Icon
Joined: 26 Mar, 2001
Posts: 2,385



Dream Kudos: 201
My Contributions


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?
User is offlineProfile CardPM

Go to the top of the page

iamcenz
post 1 Apr, 2005 - 09:14 AM
Post #2


You wish you were my hand!

Group Icon
Joined: 26 Mar, 2001
Posts: 2,385



Dream Kudos: 201
My Contributions


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...
CODE
<?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.bluntedbynature.com/landline/mobile.php

This post has been edited by iamcenz: 1 Apr, 2005 - 09:15 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 12:56PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month