nav33n 472 Purple hazed! Team Colleague Featured Poster

echo something simple.

if($loginFoundUser){ echo "found"; } else { echo "not found"; }
nav33n 472 Purple hazed! Team Colleague Featured Poster

yep.. You should have session_start on top of every page which uses session/session variable.

nav33n 472 Purple hazed! Team Colleague Featured Poster

What's the complete error ? And what do you mean by command at server side ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

;)

nav33n 472 Purple hazed! Team Colleague Featured Poster

where is session_start in shop.php ?

nav33n 472 Purple hazed! Team Colleague Featured Poster
WHERE siri = '".$_POST[status_batch][$i++]."' 
 and ".$_POST[status_batch]." = '".$_POST[status_batch]."'

Wouldn't work since $_POST is an array. Assign the value of $_POST to a variable and pass the index . For eg,

$arr=$_POST['status_batch'];
for ( $f = 0 ; $f < $fields ; $f++ ) {
echo $arr[$f];
//...
nav33n 472 Purple hazed! Team Colleague Featured Poster

Then its not entering the else part ! echo something in "if" part as well as "else" part. Check the flow.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Its working for me though. Try changing redirectUrl to http://www.yahoo.com and tellme if it works.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Thats because of the delay of 500 seconds :) OR your index.php page is blank.

nav33n 472 Purple hazed! Team Colleague Featured Poster
else if (strlen ($_POST['person_attend']) > 255)

{

$errors[] = '';

Opened { and never closed. And next time, Please post your code within code tags.

Edit: Btw, I still think there are many unclosed braces. Get a good editor, match the braces and close it accordingly.

nav33n 472 Purple hazed! Team Colleague Featured Poster

missing ; at line 69. :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Yep!

nav33n 472 Purple hazed! Team Colleague Featured Poster

No. Do what he has said in the previous post.
ie.,

echo "<script type='text/javascript'>"
echo "redirTimer()";
echo "</script>";

But, Change this line in your redirTimer function.
This

self.setTimeout("self.location.href redirURL;",redirTime);

To

self.setTimeout("self.location.href=redirURL;",redirTime);

That ll solve your problem.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Its not a good idea to store images in the database. As Ryan_vietnow has mentioned, it will add on to the server load, slows down the execution of the script and takes a lot of time to display it if you have more (say 100 images ) per page!

nav33n 472 Purple hazed! Team Colleague Featured Poster

-624

nav33n 472 Purple hazed! Team Colleague Featured Poster

long
gun
leg

Pretend

nav33n 472 Purple hazed! Team Colleague Featured Poster

I dont see any unexpected } in your code. Please post your latest code(with code tags).. And the idea (what I follow) to edit the check box's value is, When the user is in the edit screen and he has changed the checkbox's selection, I first delete all the previously selected checkboxes for that particular user and then re-insert the new values again.

nav33n 472 Purple hazed! Team Colleague Featured Poster

which line ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

not
tin
can

Directory

nav33n 472 Purple hazed! Team Colleague Featured Poster

-622

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
//connection
//select db
$selected_id=$_POST['select'];
$query="Select * from table";
$result=mysql_query($query);
$options="";
while($row=mysql_fetch_array($result)){
   $name=$row['name'];
   $id=$row['id'];
   if($selected_id==$id){ 
          $selected="selected": 
    }
   else {
      $selected=""; 
   }
   $options.="<option value='$id' $selected>$name</option>";
}
?>
<html>
<body>
<form method="post" action="test.php">
Select something: <select name="select">
<?php echo $options; ?>
</select><br />
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

Cheers,
Naveen

Morty222 commented: Great answers. +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

And what are you supposed to do ? :)

nav33n 472 Purple hazed! Team Colleague Featured Poster
<td><img src="<?php echo $photo_name; ?>"  width="30" height="30"></td>

Like that !

nav33n 472 Purple hazed! Team Colleague Featured Poster

-617

nav33n 472 Purple hazed! Team Colleague Featured Poster

Beaches

Dogs or cats ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Ugly he is not.....meanie!

Umm.. I guess you forgot the rules!

Man Eaters Are Now In England.

nav33n 472 Purple hazed! Team Colleague Featured Poster

rope
pure
per

Majority

nav33n 472 Purple hazed! Team Colleague Featured Poster

What is the problem ? And please post your code within CODE tags. Btw, there is no function called .size . Its count or sizeof.

nav33n 472 Purple hazed! Team Colleague Featured Poster

error ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Sigaard !

nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php
$handle = fopen('somefile.csv', 'r');
if ($handle)
{
  
    //the top line is the field names
    $fields = fgetcsv($handle, 4096, ',');
   
    //loop through one row at a time
    while (($data = fgetcsv($handle, 4096, ',')) !== FALSE)
    {
        $name=$data[0];
        $address=$data[1];
        $bday=$data[2]; //considering name will be in the first field, address in the second and bday in the third field.
        // Get all the fields from the csv file
       $query="insert into table (name,address,birthday) values ('$name',$address','$bday')";
       mysql_query($query);
    }

    fclose($handle);
}
?>

That's how you do it.

Venom Rush commented: Always adding to your rep ;) Such a great help +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

Tailor

nav33n 472 Purple hazed! Team Colleague Featured Poster

-615

nav33n 472 Purple hazed! Team Colleague Featured Poster

stole
hole
yell

Microsoft

nav33n 472 Purple hazed! Team Colleague Featured Poster
$query="select * from countries";
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
  $id=$row['id'];
 $country=$row['country'];
  print "<input type=\"checkbox\" name=\"chkbox[]\"  value=\"$id\">".$country."<br/>";
}
nav33n 472 Purple hazed! Team Colleague Featured Poster

As far as your 1st question is concerned, you can get the values from a csv file and insert those to a table. fgetcsv is the function name.
I don't know from where its gonna start !
And yep, that's what I was talking about. Errorcode: 2 ! The path you have specified is not the one which its looking for !

nav33n 472 Purple hazed! Team Colleague Featured Poster

He selects a keyword from the dropdown ?
Well, then, you can simply use, $query="select * from table where col like '%$value%'"; $value is the selected value of the dropdown.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Tiles

nav33n 472 Purple hazed! Team Colleague Featured Poster

I didn't get you. What do you mean by dynamic table ? you mean creating table on runtime ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

-613

nav33n 472 Purple hazed! Team Colleague Featured Poster

Some books are really boring.

nav33n 472 Purple hazed! Team Colleague Featured Poster

auto
mate
ate

Intestine

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep. File_priv ie.,

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Rob!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

What do you mean by best format to store the selected option ? If the <option> value is an integer, have an integer field. If its an alphanumeric, have a varchar field. Is this what you are talking about ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

-610