Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - que336

Pages: [1]
1
Beginners - Learning PHP / Re: Somebody please help
« on: January 11, 2012, 05:11:34 PM »
I'm all sorted now. What I needed to learn is how to pass variables through a url

2
Beginners - Learning PHP / Re: Somebody please help
« on: January 11, 2012, 09:09:59 AM »
Thanks you so much for you reply. Your advice will help me a lot but I don't think I explained what I want to do properly. See how for the url you have used Google. I want to use a php page that will show results based on the row clicked. I need to pass the id onto the next page, I tried using

PHP Code: [Select]
$result mysql_query("SELECT * FROM property") or die(mysql_error());
	

	
while (
$row mysql_fetch_array($result)){
	

	
echo 
$row['short_description'].''."</br>";
	
echo 
'<img src="'.$folder.''.$row['picture1'].'">'.''."</br>";
	
echo 
'<img src="'.$row['picture2'].'">';
	
echo 
'<img src="'.$row['picture1'].''."</br>";
	
$_SESSION['id'] = $row['id'];
	
}


But the problem is that the session is always equals to the last row in the array. I'm sorry for my poor explaining but please help me. I can't move on with my project at all and the worst part is I don't even know what to search for to get help.

3
Beginners - Learning PHP / Somebody please help
« on: January 11, 2012, 01:20:22 AM »
I'm creating a real estate website for my final year project. I have a page that displays search results using an array. This is how it looks.

PHP Code: [Select]
$result mysql_query("SELECT * FROM property") or die(mysql_error());
	

	
while (
$row mysql_fetch_array($result)){
	

	
echo 
$row['short_description'].''."</br>";
	
echo 
'<img src="'.$folder.''.$row['picture1'].'">'.''."</br>";
	
echo 
'<img src="'.$row['picture2'].'">';
	
echo 
'<img src="'.$row['picture1'].''."</br>";
	

	
}


The thing I want to do is allow the user to click on the short description and be taken to a page that shows the full description based on the link clicked. How can I do this. Please help me guys, I know it's something simple but I'm really struggling with it.

Thanks in advance

4
General PHP Help / Re: Problems displaying image Blob
« on: June 14, 2011, 04:59:36 AM »
Sorry, I forgot to say what the problem was. When I run the php page, I get a broken link

5
General PHP Help / Problems displaying image Blob
« on: June 14, 2011, 04:19:47 AM »
Hi guys

I'm new to PHP. I'm having problems displaying a picture from a Blob. Please please, someone help. This is driving me crazy lol. Here's what I have so far.

PHP Code: [Select]
<?php

// connect to mysql server
$link mysql_connect('localhost''root''');
if (!
$link) {
    die(
'Not connected : ' mysql_error());
}
// connect to database server
$db_selected mysql_select_db('images'$link);
if (!
$db_selected) {
    die (
'Database error : ' mysql_error());
}

        
//$sql = "SELECT image * FROM gallery";
	
	
$sql "SELECT image FROM gallery";
 
        
// the result of the query
        
$result mysql_query($sql) or die("Invalid query: " mysql_error());
 
        
// Header for the image
        
header("Content-type: image/jpeg");
        echo 
mysql_result($result0,'image');
 
     
?>

Pages: [1]