nav33n 472 Purple hazed! Team Colleague Featured Poster

Maybe the fieldname is wrong. And you need to post your entire code as ryan_vietnow mentioned.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Right after session_start, print $_SESSION and tell us what it prints.

nav33n 472 Purple hazed! Team Colleague Featured Poster

In the while loop, If $_POST == $myrow[0], make that as selected, else make a default value "selected".

nav33n 472 Purple hazed! Team Colleague Featured Poster

There, by your own hand. Your "solution" was a very bad one.

Damn. This is so bad. You didn't get the feeling of sarcasm from that.

As for your bagging of holyculturedownload.com, I believe that is jealousy pure and simple

ROFLMAO. Jealous of what ? That website ? :twisted: Wow man ! You have some "nice" imagination.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't see variable $newname2 getting a value.

nav33n 472 Purple hazed! Team Colleague Featured Poster

From "What is php" to the basics of php, see w3schools.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Same browser version and rating screen same like peter_budo's.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. Seems good.. But, the only problem I can think off is, either $_SESSION is empty or the query returns records with null values.
Oh, hey btw, use { } for your while loop.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Lol.. Nice signature ! Welcome to Daniweb :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

mysql_select_db("", $connection)

You haven't specified the Dbname. Turn off the notices OR (which is a very good option) initialize your variables before using it to get rid of notices.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Try running it with java -cp .;mysql-connector-java-[ver]-bin.jar Mysqlcon . You need to have the jar file in your classpath for it to find the files.
You may want to read this documentation as well: http://dev.mysql.com/doc/refman/5.0/en/connector-j-installing-classpath.html

[offtopic] Hi "Featured poster" of the month :P [/offtopic]

nav33n 472 Purple hazed! Team Colleague Featured Poster

Clearly you have a bee in your bonnet. So, you find that javascript controls dont work on a site when javascript is turned off? Congratulations, perhaps you learned something?

Unfortunately, I didn't learn anything (well, because there is nothing to learn from that.) But the answer for

So, you find that javascript controls dont work on a site when javascript is turned off?

is, Yes. With javascript turned off, some features of the site doesn't work.

the point there was that this is vital for search engines,

I never mentioned any search engine. The OP had a question and I just answered.

not for users who KNOW they cannot disable javascript on such a site and expect to enjoy the rich features.

if the user has javascript turned off? Nothing happens, not good.

I know exactly what my first point was - that if javascript is turned off in a FORM for user input and it does not function, then that is not good (your form example).

Again, how can one turn off javascript IN a form and not the whole page. (From the end user's POV.)

Try the form on holyculturedownload.com and tell me that it doesn't work, both with and without javascript - THAT is how forms should work.

I had enough of that stupid site. And the enduser can't "turn off" javascript for a form. If he turns it off, he turns it off for the whole page.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

Where are you redirecting to page3? All I see is redirection to index.php if the session is not set. Is it entering the if loop? Have a print statement, comment the header function and check!

And please, USE code tags.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Which is the 3rd page ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

oh cool ! Will do that in future.. Cheers man!

Hey, I saw this in "Flag bad post" ! :-/

Note: This is ONLY to be used to report spam, advertising messages, and problematic (harassment, fighting, or rude) posts.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Okay ! I thought flag bad post was to notify the moderators that the post has violated the rules. Thanks for clarifying !

nav33n 472 Purple hazed! Team Colleague Featured Poster

If you use onload function, it will replace whatever you selected by the default value. What you can do is, check if the user has already selected any value from the listbox. If the user has selected a value already, then make that as "selected", else, make the default as selected.
Eg.

<?php
$selectedvalue = isset($_POST['selectbox']) ? $_POST['selectbox']:"default_select";
?>
<form method="post" action="select.php">
<select name='selectbox'>
<option value='default_value' <?php if($selectedvalue=="default_value") { echo "selected"; } ?>>default</option>
<option value='1' <?php if($selectedvalue=="1") { echo "selected"; } ?>>1</option>
<option value='2' <?php if($selectedvalue=="2") { echo "selected"; } ?>>2</option>
</select>
<input type="submit" name="submit" value="submit">
</form>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

I am not really sure why you got "Query was empty" message. :-O

nav33n 472 Purple hazed! Team Colleague Featured Poster

This is strange. But one thing.

$sqlrow = mysql_fetch_row($sqlresult); <<-- THIS IS LINE 109 -->>
if ($sqlrow == 0) {

You have used mysql_fetch_row. It returns rows as numeric array . So, you can't give, $sqlrow. You can use mysql_fetch_array instead. I am not sure if this will help, but remove ` from your query !

nav33n 472 Purple hazed! Team Colleague Featured Poster

but my if loof is not getting executed in 2nd page.

Check your query in page2. See if its correct and it returns atleast 1 record.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-926

nav33n 472 Purple hazed! Team Colleague Featured Poster

-922

nav33n 472 Purple hazed! Team Colleague Featured Poster

<form name="Dates" action=".php" method="post" onsubmit="return checkCheckBoxe();">

action=".php" should be action="filename.php".

nav33n 472 Purple hazed! Team Colleague Featured Poster

Post your complete latest code.

nav33n 472 Purple hazed! Team Colleague Featured Poster

The point was that the SITE functions without javascript for the purpose of search engine indexing (which it does very well).... I dont believe that Googlebot listens to music

Nope. That wasn't the point. The point was,

And if the user has javascript turned off? Nothing happens, not good.

What Ajax? A well written script will function without either javascript or Ajax. A good example: http://holyculturedownload.com/

.
But the bottomline is, if javascript is disabled, many options in the site holyculturedownload doesn't work.
FYI,

JavaScript must be enabled in order for you to use Gmail in standard view. However, it seems JavaScript is either disabled or not supported by your browser. To use standard view, enable JavaScript by changing your browser options, then try again.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Indent your code, find an unclosed brace { and close it.

nav33n 472 Purple hazed! Team Colleague Featured Poster

When you start the script, make $myusername null. Then assign a value to it and then print it.
ie., $myusername="";

nav33n 472 Purple hazed! Team Colleague Featured Poster

What Ajax? A well written script will function without either javascript or Ajax. A good example: http://holyculturedownload.com/

That unfortunately, didn't work in FF2 when I disabled javascript. Click on the "Listen" button to test. Strangely, even gmail's "send" button didn't work when I disabled javascript.

A form should not rely only on javascript for validation - the PHP side should also check the $_POST data.

Yes, ofcourse.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Tavisha !

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Heh! I just finished my work, had nothing to do. So, I was being patient :P ! Anyways, ciao !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep. Use an img src tag to get the image from the filename. echo "<img src='$filename'>";

nav33n 472 Purple hazed! Team Colleague Featured Poster

Okay ! some mistakes.
1. Insert into tablename (columnname) [b]values[/b] ('value'); Anyway, I dont know how your function make_thumb work, but this works.

<?php
 
include "db.php";
$con = mysql_pconnect("$xxx","$xxxxx","$xxxxx") or die ("QUERY ERROR: ".mysql_error());
$db = mysql_select_db($xxxxx, $xxxxx) or die("QUERY ERROR: ".mysql_error());
 //define a maxim size for the uploaded images
 define ("MAX_SIZE","500"); 
 // define the width and height for the thumbnail
 // note that theese dimmensions are considered the maximum dimmension and are not fixed, 
 // because we have to keep the image ratio intact or it will be deformed
 define ("WIDTH","200"); 
 define ("HEIGHT","200"); 

  // this is the function that will create the thumbnail image from the uploaded image
 // the resize will be done considering the width and height defined, but without deforming the image
 function make_thumb($img_name,$filename,$new_w,$new_h)
 {
 	//get image extension.
 	$ext=getExtension($img_name);
 	//creates the new image using the appropriate function from gd library
 	if(!strcmp("jpg",$ext) || !strcmp("jpeg",$ext))
 		$src_img=imagecreatefromjpeg($img_name);

  	if(!strcmp("png",$ext))
 		$src_img=imagecreatefrompng($img_name);
	
	if(!strcmp("gif",$ext))
		$src_img=imagecreatefromgif($img_name);

 	 	//gets the dimmensions of the image
 	$old_x=imageSX($src_img);
 	$old_y=imageSY($src_img);

 	 // next we will calculate the new dimmensions for the thumbnail image
 	// the next steps will be taken: 
 	// 	1. calculate the ratio by dividing the old dimmensions with the new ones
 	//	2. if the ratio for the width is higher, the width will remain the one define in WIDTH variable
 	//		and the height will be calculated so the image ratio will not change
 	//	3. otherwise we will use the height ratio for the image
 	// as a result, only one of the dimmensions …
nav33n 472 Purple hazed! Team Colleague Featured Poster

Yes. It is possible to store the path of the file. The datatype is varchar as you have mentioned. Store the path, then display the image by retrieving the path from the table and use it in the image tag.

$query = "select path from table";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$path = $row['image_path'];
echo "<img src = '$path'>"; //list all the images 
}
kevin wood commented: is very helpful and gives good feedback +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

Dude, try out a simple query to insert a record to the table. When you upload an image, add the path to the table. Do you upload an image through a script or manually ? Check this example. http://www.tizag.com/phpT/fileupload.php $target_path will be the path where the image is gonna be stored. Save it in the table. If that doesn't work, you have to post your latest complete code.

nav33n 472 Purple hazed! Team Colleague Featured Poster

If javascript is disabled, even the form validation/ajax wouldn't work. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yes. It is possible to fetch the files from the server without storing the filename in mysql. You have to open the directory , read the directory and list the files ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

UPDATE images_broad SET broad1='image/thumbs/thumb_1206968603.gif'

That wouldn't put anything to the table, since your table has no records. Try this.

$query = "insert into images_broad (broad1) values ('image/thumbs/thumb_1206968603.gif'); 
mysql_query($query);

Then execute the above script to check if a record exists or not. I am sure it will say, "There is something!" !

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm.. In that case, try a simple script like this one.

$query = "select * from images_broad";
$result = mysql_query($query);
if(mysql_num_rows($result) > 0){
 echo "There is something!"; //prints if there are more than 0 records
} else {
echo "There is nothing !"; // prints if there is nothing in the table
}

Tellme what it prints.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, I hope you have phpmyadmin atleast ? If you do, you can execute your query in phpmyadmin. You can use sqlyog to connect to remote server actually.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. never faced this problem before.. Has it exported the images properly from ms-access to mysql ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. Did you execute the query select * from images_broad in mysql console ? Did you get any output ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html I haven't tested it, but this is how it works.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Check mail function in php.

nav33n 472 Purple hazed! Team Colleague Featured Poster

First of all, you are updating the table without any condition. So, it will update all the records and set broad1 = image/thumbs/thumb_1206960238.gif. Secondly, its echo $result and not echo $result ['$thumb_name'];

nav33n 472 Purple hazed! Team Colleague Featured Poster

Your query should be SELECT * FROM details WHERE columnname LIKE '$_POST[search]'% LIMIT 0, 50

nav33n 472 Purple hazed! Team Colleague Featured Poster

-917

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hmm.. Print out your query ( print $sql; )and execute it in mysql console or phpmyadmin. See if it returns any row. If it doesn't, then the problem is not with the query and there are no records. If it returns an error, post that error.