franknu Posted November 13, 2006 Share Posted November 13, 2006 ok I want to display a picture from my database i difines the variable but now it doesnt even show the frame for the picture , i also want to create a link or more info to another page. my error message is Notice: Undefined index: includefiles/bizwebpage2.php in c:\program files\easyphp1-8\home\townsfinder\business_display.php on line 79 i tried difining it at the top but [code=php:0] ((( Online 79 I have echo '<a href="'. $row['includefiles/bizwebpage2.php'].'">' . $row['BusinessName'] . '</a>'; //link to an))) [/code] Can anyone please tell me how to do this i dont know what to do anymorehere is my full code:[code=php:0] <?php$host = "localhost";$username = "localhost";$password = "abc123";$database = "contacts";$Categories = addslashes ($_POST['Categories']);$make = addslashes ($_POST['make']);$type = addslashes ($_POST['type']);if(!$Categories ||!$make||!$type){ echo "You have not enter all fields"; exit; }$db = mysql_connect($host, $username, $password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); $bizwebpage2 = (isset($_FILES['bizwebpage2']) ? $_FILES['bizwebpage2']:'');$Picture1 = (isset($_FILES['Picture1']) ? $_FILES['Picture1']:'');if(isset($_GET['Categories'])){ $Categories = addslashes($_GET['Categories']); } else { echo("No Categories found."); } $query = "SELECT * FROM `business_info` WHERE `Categories` LIKE '%".$Categories."%'"; $result = mysql_query($query) or die (mysql_error()); $num_result = mysql_num_rows($result); echo "<table>";if($num_result <= 0){ echo("No Results found."); exit;}//include login row echo "<tr>"; echo "<td>"; echo"login"; echo "</td>"; echo "</tr>"; //inlude topsearch echo "<tr>"; echo "<td>"; include("includefiles/topsearch.php"); echo "</td>"; echo "</tr>"; //business found row echo"<tr>"; echo"<td div align='right' bgcolor='DFDFDF'>"; echo"<p>Number of business found: ".$num_result."</p>"; echo"</td>"; echo"</tr>"; while($row = mysql_fetch_array($result)){echo "<tr>";//picture columsecho "<td>";echo"<table>";echo"<tr>";echo"<td>";echo "<img src='$Picture1' width=\'203\' height=\'152\'>"; // picture display//business columsecho"</td>";echo"<td>";echo '<a href="'. $row['includefiles/bizwebpage2.php'].'">' . $row['BusinessName'] . '</a>'; //link to another pageecho "<br>";echo ($row["Slogan"]); echo "</strong><br>Address: "; echo (stripslashes($row["Business_Address"])); echo "<br>State: "; echo (stripslashes($row["make"])); echo "<br>City: "; echo (stripslashes($row["type"])); echo "<br>Tel: "; echo (stripslashes($row["Tel"])); echo "</p>"; echo"<hr>"; echo "</td>";//include banner colums echo "<td>"; include("includefiles/side_business_banner.php"); echo "</td>"; echo "</tr>"; echo "</table>"; echo "</td>"; echo "</tr>"; echo "</table>"; }?>[/code] Link to comment https://forums.phpfreaks.com/topic/27122-displaying-pictrure/ Share on other sites More sharing options...
franknu Posted November 13, 2006 Author Share Posted November 13, 2006 i made this change to the picture line. but still, i am having the same problem[code=php:0]echo "<img src=\'[$Picture1]\' width=\'203\' height=\'152\'>";[/code] Link to comment https://forums.phpfreaks.com/topic/27122-displaying-pictrure/#findComment-123981 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.