Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
Don't you mean? $answers[$i]
-
Nice, what's the game about? (if you don't mind me asking...)
-
I am new to php and having trouble setting up a php email form
Maq replied to FencingFreak's topic in PHP Coding Help
Please use tags around code for proper syntax highlighting and formatting. You don't have a button named 'email' so it's never being submitted... Add to this line: Also, if you're using the post method why not use it? Replace all of the '$_REQUEST' with '$_POST'. -
Echo $query2 right underneath the string, to see what is actually being passed. Also change this line to: $result2 = mysql_query($query2) or die(mysql_error()); This will tell you if the query is failing.
-
Which table doesn't it INSERT to? There are two, 'users' and 'customerinfo'. Also, change this line to: if(!$result || !$result2) { || - meaning OR, will check if either query failed, rather than both. Reason being is that your if wouldn't execute if 1 of the queries was successful and one failed. Also, what exactly happens? You should try to echo things out to see where your script actually goes.
-
[SOLVED] basic question about PHP include in head
Maq replied to suede1976's topic in PHP Coding Help
Instead of this: $page = $_GET['page']; if (!$page) { $page = "home"; } Just do this: $page = (isset($_GET['page'])) ? $_GET['page'] : "home"; It's called a ternary operator. And this line should use double '=='. Single is for assigning, double and triple is for comparing. (triple compares datatypes as well as value) if ($page == "portfolio") { -
[SOLVED] PHP and Javascript: Just How Similar are they?
Maq replied to Fluoresce's topic in Miscellaneous
Really, how? -
You can add this hidden field:
-
Anyone ever got a random number 1 in their page?
Maq replied to glenelkins's topic in PHP Coding Help
Maq, it's true you asked if he had any include and or requires, but his answer isn't wrong either. I just re-read and realized he only specifically said 'no' to includes. But I was assuming he meant both... -
Anyone ever got a random number 1 in their page?
Maq replied to glenelkins's topic in PHP Coding Help
I asked you if you had any requires and you said no... -
Anyone ever got a random number 1 in their page?
Maq replied to glenelkins's topic in PHP Coding Help
Post the code please. -
Have you done anything so far? You can Google this topic, there are thousands of examples and tutorials on this.
-
It's really impossible for us to help... You need to read the documentation of the methods and see what you need.
-
Anyone ever got a random number 1 in their page?
Maq replied to glenelkins's topic in PHP Coding Help
No, never experienced that before. There has to be something that outputs a '1'. Do you have any includes/requires? Is your page static HTML? -
I guess it could be there.. the name of that current sticky kind of threw me off admittedly. I'll just post it there I guess.. I just noticed that there was no specific resources thread.. I suppose that one is it? I guess, that's the only sticky in that section. I agree the name should be changed to something simple, maybe just, "SEO Resources"?
-
Do you mean:
-
Have you checked the MySQL server logs? Find out what time these scripts are executed and check the script that's called in the crontab at that time. I think you mean INSERT. You may be able to grep -li "INSERT table_name" / and find out all files that insert to this table.
-
Not sure exactly what you mean by this...
-
You're going to need to use cURL & set up a cron tab (task scheduler for windows) to run the script. Do you have anything done yet? If you want people to give specific help you need to ask specific questions. NOTE: If you want someone to write this for you in exchange for graphical favors, I'm not saying this is what you want, but if you do, then I will move you to the freelance section.
-
It depends, what exactly are you trying to do? Remember PHP lives on the server while JS is client side.
-
How are the problems stored?
-
I think he took my syntax literally when I gave him this example:
-
Sub-queries like this aren't supported with earlier versions of MySQL but this should give you an idea. SELECT * FROM question WHERE id IN(SELECT id FROM question ORDER BY id DESC LIMIT 10) ORDER BY id ASC *Not tested This should give you an idea of how to create a dynamic table with the results from the query. You simply add the rows/columns that are dependent on the query inside the while loop: </pre> <table width="500" border="0" cellspacing="0" cellpadding="0"> Question //these should be table headers, correct? Name Email while($row = mysql_fetch_assoc( $result )) { echo ""; echo "$row['name']"; echo "$row['question']"; echo "$row['email']"; echo ""; } ?> </