PHP - Moved: How To Link One Db Record To Another...
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=353620.0 Similar Tutorialscan i use a link to drop a record, or do u need to do a form and use a button to post to a page? Greetings! I have a website www.lanceronlinejobs.com/our_franchises.php I have a franchise images. I want to display each franchise record from database whenever a user click on franchise link. Here is my code. ourfranchises.php code: Code: [Select] <?php include('fconnection.php'); $sql = mysql_query("SELECT * FROM tbl_franchise ORDER BY id DESC") or die(mysql_error()); $row3 = mysql_fetch_array($sql); ?> <a href="franchiseDetails.php?city=<?php echo $row3['city'];?>"><img src="images/lbatkhela.jpg" width="150" height="150" alt="Batkhela" /></a>---------------------------------------------------------------------- franchiseDetails.php code: Code: [Select] <?php $id = $_GET['id']; $query = "SELECT * FROM tbl_franchise WHERE id = '$id' ORDER BY id DESC LIMIT 1"; $result = mysql_query($query); if (!$result) { echo "NO RECORD FOUND"; } else { while($row3 = mysql_fetch_array($result)): ?> Manager Name: <?php echo $row3['manager_name'];?> Please help me. Any help would be appreciated. Thanks. I have the following code: Code: [Select] $result = mysql_query("SELECT * FROM ESSAY_QUESTIONS WHERE SUBJECT = 'ENGLISH'") or die(mysql_error()); while($essay_data=mysql_fetch_array($result)){ $question = $essay_data['QUESTION']; $id = $essay_data['ID']; echo "<a href=\"englishessays.php?id=$id>"; echo "$question </a>"; echo "<br><br>"; } It seems to be almost working but it just displays one link and the address is all the rest of the code including </a>"; echo "<br><br>"; and other questions. I presume there's an error with how I've written the echo statements so can anyone see it? Or can anyone suggest a better way to do this? On the next page, the php will read the ID from the address and display the information form that record. I have finaly got my removing recods page working, but i do have one problem... i have a delete button which goes to a new php page which contains the DELETE FROM, this deletes the record automaticaly. There are two paths which i could choose from the problem is i am stuck on both of them. 1. a link that will activate the delete code. 2. once the record has been deleted then it will automaticaly go back the the first page. can any one help me here please? I know with a submit button I can have a new record created when clicking it, but is it possible to do with a text link? This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=348130.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=347192.0 Hi, n0obie here. I'm trying to identify where my customers are coming from via emails I've sent/received. However, many email providers (namely Gmail) have circumvented this by disallowing IP address geolocation/image caching. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=344960.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=307669.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=311598.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=306802.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=320284.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=321416.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=359149.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=354388.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=321778.0 This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=316401.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=308937.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=317025.0 |