![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
dannyb785
-
Posts
544 -
Joined
-
Last visited
Posts posted by dannyb785
-
-
@dannyb785: He already solved it.
my bad. the "problem solved" option wasn't check for the thread. How did you know it was solved?
-
Dont make files with 2 dots. Not a good idea. just make it form1inc.php. Not saying thats the answer, but it'll get you out of trouble in the future.
Also...
someone should respond pleaseisn't the right way to approach a FREE forum for php help. Especially since it's only been a day and a half since you posted it. Have patience.
-
If the code you have really doesnt work... well php can be finicky(I've noticed on occasion) so I'd say switch the clauses to be like "if (num_rows > 0) echo view; else echo generate.
I don't see any other reason why the code doesn't work.
-
Use fckeditor. Or nicedit. Or yahoo's rich text-editor. Boo yah. Thread solved
-
Technically, the image is never uploaded until after it has been checked. The way you asked the question was as if the image is uploaded and THEN the file type is checked. Is it just giving you an error no matter what? Or can you give an example of the issue you run into?
-
Yep... just one of them things
-
You could also record images uploaded in a database. Then just do a mysql query for all images(or just the ones you want) and then
$n = 0;
while($row = mysql_fetch_assoc($result))
{
extract($row);
echo "<img src=$image_file_location height=200 width=200>";
$n++;
if($n == 5)
{
echo "<br>\n";
$n = 0;
}
}
something like that
-
wtf?
I second that.
-
Your setup confuses me...
when you put
`POSTS` - TABLE ID TITLE MEMBERID 2 Holiday 4 3 Travel 3 4 Boats 4
but in the table above it, travel's memberid was 9. Also, you said you're looking for 1/3/4(in your example) and you have 4/3/4 listed as the results you expect to get.
-
I agree with hitman, post the conn.php and there will likely be an error there
-
Can you please give an example of what you might be putting into the column? With mediumtext, I dont believe you have to specify a length.
But I think what your problem is, is the way you have serialized to be inserted.
'". $sqlinput ."' Is weird. Even if it may be correct by php standards(I never do it, but I dont wanna say its invalid syntax), you generally only want to have the 2 single quotes on both sides of the variable. And I dunno why you have the dots on both sides also. So make it:
"$sqlinput"
And that should work.
-
provided you have the date in raw format(strtotime format), you can do either..
I have a get_midnight function which basically gets the day today and calculates the exact second that midght today hit and then I do a query for everything with a date greater than that value. That'd give you everthing that was done today.
Hope that helped
Edit: here's the get_midnight function..
function get_midnight($timestamp)
{
$day = date("j", $timestamp);
$month = date("F", $timestamp);
$year = date("Y", $timestamp);
$midnight = strtotime("$month $day $year");
return $midnight;
}
-
What does an "image" row look like?
Name img_name
Size (Bytes) img_size
Type (JPG,GIF) img_type
File History img_filehistory
Brown Hair img_brownhair
Now I have this.....
$result = mysql_query("SELECT * FROM image");
while($row = mysql_fetch_array($result))
if($row['checked']==1) {
$checked = "checked";
} else {
$checked = "";
}
echo "<input name=\"image[$row['img_brownhair]\" type=\"checkbox\" value=\"true\" $checked >"
and I get an error on the last line (the echo)
T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
it works if I do this :
I took out the ' in the [img_brownhair] and added a ; at the end of the echo, although if img_brownhair already equalled "1" (checked) it doesn't show up checked.
Get rid of the first single quote where it says img_brownhair and it should work
Help with If / Else Statement
in PHP Coding Help
Posted
^ lol. whats funny about that is that I assumed that his reply(that said problem solved) was the guy who first suggested help but was saying "I need to wake up, my bad".