nethnet
-
Posts
284 -
Joined
-
Last visited
Posts posted by nethnet
-
-
You are outputting HTML to the page before you even put the <HTML> tag. Move your PHP down to after the <BODY> tag so that you have valid HTML. This is most likely your error.
-
I have absolutely no idea what you mean by that. Could you rephrase that a bit more clear?
-
Since it works in FF and not IE, I'm assuming you initiate the session properly, but in that case it's probably the cache. You can adjust this with headers (because as someone mentioned, IE likes to cache pages... good for bandwidth, bad for you). Try adding this to your header:
[code]header("Cache-control: private");[/code]
That will force the page to reload, instead of using the cached version. -
if (!isset($_GET['whatever'])){
default text here
} -
Actually, you can store images in a MySQL database if you create the field as a BLOB type.
-
I dont feel like counting. Post line 191 and surrounding lines (mark 191)
-
From the manual:
[quote] If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), you can specify the file to be included using a URL (via HTTP or other supported wrapper - see Appendix M for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script.
Warning
Windows versions of PHP prior to PHP 4.3.0 do not support accessing remote files via this function, even if allow_url_fopen is enabled.[/quote]
What version of PHP are you using?
Also, try replacing that include with an echo just to see exactly what string is being used by the include function. -
Yup. It makes it much cleaner (not to mention easier to maintain, since you don't have all those slashes :))
But, whatever works for you. -
...
.....
Why are you echoing you're entire page?!
If you must echo the entire thing, at least use Heredoc, but you shouldn't have to. Just close the PHP tags before your HTML and open them back up again afterwards, and when needed inside the file. -
Insert them with the MySQL function now(). That inputs a timestamp. You can always format it when you retrieve it from the database.
-
There's one titled Advanced Pagination Tutorial or something like that which limits the pages displayed on both sides of the current page, just like he wanted. Either way, you have a solution, either in that tutorial or in the code posted above. They're both worth checking out, just to see the different methods of acomplishing it.
-
Ignore this post. I was stupid.
-
There are also at least two wonderful tutorials on the PHPFreaks site that accomplish exactly what you ask for. I would recommend checking them out to learn a thing or two so repeating this in the future doesn't consist of trying to dig up old code. Good luck!
-
That is what I suggested, but he insists on doing it with JavaScript (not really sure why).
-
try echoing $query2 inside your else statement so we can see exactly what is being queried to the database, that way we can also see if the else statement is being executed.
-
That should be $id['id'] instead of $row['id']; There is no $row array in your script.
-
Right, I didn't mean to say that MySQL doesn't have ANY comparison operators, just not the two which were in the script. AND and OR must be used.
-
I assume you cannot edit this script?
-
You also have to realize that MySQL syntax is different than PHP syntax. PHP uses comparison operators (such as == and &&), MySQL doesn't. You had these PHP operators in your MySQL query which was causing your errors. I know you want to learn everything as simple as posible, and avoid all of the technical jargon and whatnot, but you're going to kick yourself later when you HAVE to go back and relearn everything as you should have learnt it the first way. Believe me, it's not that hard if you just take the time to work with it. Like in the previous post, you are going to have to understand both MySQL and arrays before doing yoru database queries. You can't just echo your array without accessing an individual element. If what I'm saying confuses you, do a quick google search for PHP arrays and read some articles. This is very basic stuff and what you are trying to accomplish cannot be done without understanding it.
Good luck. -
I don't see why the \n would force new elements into yoru array instead of just appending to the string, but I'm not going to question your error. That's a bit pointless.
This is a bit of a longshot, but my guess is that it's a multidimensional array. Try putting a second key on there and seeing if that yields any different results.
$_POST['Domains'][0];
$_POST['Domains'][1];
etc...
-
Don't use the '==' comparison operator in MySQL. Replace those with a single equal sign.
-
Put {} around your function.
-
Okay, well, I can tell you why your JavaScript isn't working. Part of the DOM is that you cannot dynamically alter the attributes of something that hasn't yet been created. For instance, you are trying to set an action to your form and submit it before you even create that form in the HTML. You will have to put that segment of PHP/JavaScript after you create your form or else it will not work.
-
99% of forms are processed in the way I outlined. It's simple, easy to maintain, and secure. I would recommend that over using Javascript wholeheartedly. Some users may have it disabled... what then? Will they just not be able to use your forms? Javascript is also very easily taken advantage of by malicious users if you wish to validate your submissions that way.
PHP in HTML cuts off HTML (Fixed!)
in PHP Coding Help
Posted