-
Posts
1,469 -
Joined
-
Last visited
-
Days Won
12
Everything posted by CroNiX
-
I don't know of any specific php settings other than the ones I mentioned above. Maybe you can run a phpinfo() on your localhost and another on the server and start comparing values. I assume that you have the gd/imagemagick/whatever extensions installed on the remote server or you would have gotten error messages since you say they are turned on. Have you searched php.net for the extension you are using to see if there is anything useful there regarding your problem?
-
Looks like I somehow added a '[' preceding the echo statement and you copied it. Just remove it. You should be able to find these errors by the error messages...
-
Yeah, according to google it means 'hah good human pomogna .... somebody mnooo "Give code"' Just poor taste to post foreign languages on an English board...
-
You can't directly. PHP is parsed before the document is even sent to the browser. You can with a mix of javascript/ajax/php...
-
The problem is in this part: value=\" . $row['id'] . \">"; You escaped the quote but didn't add an end quote here: value=\" And same thing here, you didn't start the quote and then escape a quote, you just escaped a quote: $row['id'] . \">"; much simpler to do: [echo '<input type="hidden" name="id" value="' . $row['id'] . '">'; or even better, do it in html and then add the php where you need it. You are confusing yourself. ?> (end the php) <input type="hidden" name="id" value="<?php echo $row['id']; ?>"> <?php //...continue php code
-
Nevermind... good luck
-
Just this part looked familiar: $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
-
Looks like someone has been borrowing code from vBulletins database class
-
I think it is a waste of resources to use ajax to constantly poll the server to return the time. If you have 1000 users doing that, it could easily slow your server down (that would be 60,000 hits a minute on your server)...and for something as trivial as displaying the server time... Why do your users need to know the up-to-the-second server time? If you wanted, you could 1) get server time using php 2) using javascript, you could advance that time so all of the work is done clientside and doesn't waste server resources.
-
And again...it's very difficult to troubleshoot someones code when they don't post it...
-
ah, sorry, didn't escape the quotes around post. method="POST" in that line should be: method=\"POST\"
-
Well, since you didn't post any code we can only guess... But I would check these settings in your php.ini post_max_size upload_max_filesize
-
In addition, You should probably use: mysqli_fetch_assoc() instead of: mysql_fetch_array()
-
Mostly cleaned up This: echo "<form action="'.basename($_SERVER['PHP_SELF']).'" method="POST">"; (this is line 57) should be: echo "<form action=\"".basename($_SERVER['PHP_SELF'])."\" method="POST">"; //some single quotes in there messing it up
-
Lee-Bartlett: <?php echo <form action="'.basename($_SERVER['PHP_SELF']).'" method="POST"> echo '<input type="hidden" name="id" value="' . $row['id'] . '">'; echo "<td> <input type=\"submit\" value=\"update\" name=\"updatebutton\" > </td>" echo "<td> <input type=\"submit\" value=\"update\" name=\"updatebutton\" > </td>" echo "<td><input type=\"submit\" value=\"delete\" name=\"deletebutton\" > </td>" echo "</form></td>" echo "</tr>" CroNiX: Your syntax is all messed up. You are missing quotes and semicolons everywhere... like your first echo doesn't start or end with a quote....you don't have a semicolon after each statement...
-
PHP Newbie - Probably very simple answer - whats missing from code???
CroNiX replied to wizpeep's topic in PHP Coding Help
I assume the page that your form is on is 'formhandler.php'? if so, put this at the top for each variable you use in your form: <?php $name = isset($_POST['name']) ? $_POST['name'] : ""; //this tells it that if the form was submitted, get the value of 'name' from the post array and assign it to the variable $name, if it wasn't set, set it to "" (nothing). ?> <HTML> .... @budimer - Where did he ask anything about a database? -
Have you corrected your syntax errors? Post what you came up with...
-
Your syntax is all messed up. You are missing quotes and semicolons everywhere... like your first echo doesn't start or end with a quote....you don't have a semicolon after each statement...
-
You should probably post how these 2 db tables are structured: movies, categories
-
I would change if (isset($fetched['agent_email'])) { to if (isset($fetched['agent_email']) && !empty($fetched['agent_email'])) {
-
It would help to post the code you are using. Please use the code tags (# icon in editor).
-
Yes, for less than 1% of people maybe, but the majority wouldn't even know to do it. There is no perfect solution for this dilemma.
-
[SOLVED] Using a string as part of a string name.
CroNiX replied to Seven_Rings's topic in PHP Coding Help
$one="1"; //string $four="4"; //string echo (int)$four - (int)$one; //cast them as integers and subtract them -
You can use some javascript and when a link is clicked make it disappear until the page is loaded again. Or if you are using buttons you can disable them. Then they couldn't click on it again until the page is reloaded.