echo something simple.
if($loginFoundUser){ echo "found"; } else { echo "not found"; }
echo something simple.
if($loginFoundUser){ echo "found"; } else { echo "not found"; }
yep.. You should have session_start on top of every page which uses session/session variable.
What's the complete error ? And what do you mean by command at server side ?
;)
where is session_start in shop.php ?
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];
//...
Then its not entering the else part ! echo something in "if" part as well as "else" part. Check the flow.
Thats because of the delay of 500 seconds :) OR your index.php page is blank.
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.
missing ; at line 69. :)
:) Yep!
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.
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!
-624
long
gun
leg
Pretend
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.
which line ?
not
tin
can
Directory
-622
Welcome to Daniweb! :)
<?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
And what are you supposed to do ? :)
<td><img src="<?php echo $photo_name; ?>" width="30" height="30"></td>
Like that !
-617
Beaches
Dogs or cats ?
Ugly he is not.....meanie!
Umm.. I guess you forgot the rules!
Man Eaters Are Now In England.
rope
pure
per
Majority
What is the problem ? And please post your code within CODE tags. Btw, there is no function called .size . Its count or sizeof.
error ?
Welcome to Daniweb Sigaard !
<?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.
Tailor
-615
stole
hole
yell
Microsoft
$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/>";
}
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 !
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.
Tiles
I didn't get you. What do you mean by dynamic table ? you mean creating table on runtime ?
-613
Some books are really boring.
auto
mate
ate
Intestine
Yep. File_priv ie.,
Welcome to Daniweb Rob!
Welcome to Daniweb :)
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 ?
-610