-
Posts
2,965 -
Joined
-
Last visited
Everything posted by mikesta707
-
that probably means your query failed. add or trigger_error(mysql_error()); right after your query (on the same line) and see if you get a more useful error
-
when you pass an HTML array like that, the returned value in the post array is an array itself. so $Price = $_POST['Price[$P]']; is actually incorrect, it should be $Price = $_POST['Price']; and you could then loop through that array by doing something like foreach($Price as $eachPrice){ //whatever or one of PHP's other looping functions in your case, since you seem to already have a counter variable ($P) you may be able to just do $Price = $_POST['Price;'][$P]; and that would get you the price at offset $P
-
Hmm, very interesting. The MySQL manual doesn't provide any documentation on that as I could find. Maybe Ill try that out when I get home. I have 5.2.something on my home computer so it might be different. and SET is the old INSERT syntax I believe. I remember using that a while ago, and it suddenly not working. (it worked when using the (column) VALUES() syntax) but according to the manual, both syntaxes are valid. Perhaps the insert into thing has something to do with strict mode being on or off. I'll look that up and see
-
I feel your pain, I have a lab from 8-11 on tuesdays. That combined with an hour commute is brutal
-
In depth how would I do an Recent News section
mikesta707 replied to c-o-d-e's topic in PHP Coding Help
Order by the date? -
help plz -----problem with header redirection --------urgent
mikesta707 replied to coolabhijits's topic in PHP Coding Help
oh, didn't even see the other go() calls. Try turning error reporting on by adding the following to the top of your page error_reporting(E_ALL); ini_set("display_errors", 1); and post any errors you get -
Wow, totally misread your post. I hate it when I argue with someone I agree with. Carry on then, nothing to see here
-
help plz -----problem with header redirection --------urgent
mikesta707 replied to coolabhijits's topic in PHP Coding Help
this won't work $result = mysql_query("SELECT password FROM login where name='".$name."'"); if(!$result)//checking for null { go(); } at that query will return a result set since its a valid query (even if its an empty result set) you probably want to do something more like if (mysql_num_rows($result) < 1){//no rows returned go(); } -
If president bush authorized the destruction of the world trade center, he would have been blamed for murdering thousands of Americans himself... You really think the families of the firefighters/workers would be OK with them having died at the hands of the president, rather than him trying to let the firefighters save them? He would have been impeached immediately... There is absolutely no public spin that would have made him purposefully killing thousands of Americans OK. I understand the whole, 1 dies to save a thousand thing, but firstly, in America that kind of thing is treated a lot differently than in other countries. I don't know, I understand your point, but i disagree
-
you probably want an echo in there value="<?php echo (isset($savings)) ? $savings : $bigZero;?>"
-
What is the query actually doing, and what do you expect it to do
-
help plz -----problem with header redirection --------urgent
mikesta707 replied to coolabhijits's topic in PHP Coding Help
First off, put your code in code tags please. Secondly, what exactly is the problem? -
<?php if (!empty($row_RS_customer_data['mobile_number'])) { echo '<a href="send_text.php?phone_number='.$row_RS_customer_data['mobile_number'].'">Click here to send this customer a Text Message</a>'; //ect... like that?
-
that hasnt fixed it... i didnt even realise that the INTO keyword was actually needed it's actually not needed. silly, but true. are you sure? what version of Mysql are we talking? I was under the impression that it was, and from my experience with insert queries, it always has been. I don't have a test environment to test in, and google has been no help, so i guess I will have to take your word for it. As for OP, have you tried to second Insert syntax (IE the INSERT INTO (col, col, col,) VALUES(value, value, value)) depending on your version, you may have to use the second syntax. also try echoing the queries to see what they look like, and if they look like what you expect
-
You would destroy a building with 10,000 people in it, and 1000's of firemen trying to save them? I'm glad your not president...
-
your missing the keyword INTO INSERT INTO `attack_log` ....
-
you want to check if your get variables are set before you do the mail stuff, so What i would do is add a name to your submit button <input type="submit" name="submit" class="formbutton"/> and then do something like if (isset($_GET['submit'])){ //do email stuff } else { //whatever you want to do if the form wasn't submit } another thing, the reason your validation currently isn't working is because you have a logical error if (strlen($name) <0) that will only trigger the error if the length of the string is in the negatives (because it has to be less than 0) you probably want something like if (strlen($name) <= 0) //or if (strlen($name) < 1)
-
I don't see much wrong. changing your query line to $result = mysql_query ($query) or trigger_error(mysql_error()); for debugging purposes (you want to change it back when it goes into a production environment, but for now, we want to see the mysql error) that error usually happens when the query fails. Showing the mysql error can help pinpoint where the problem lies
-
if (isset($contact) && !empty($contact)){ //display } something like that what you're looking for?
-
in addition to what eRott posted, you can check if the file exists by doing something like the following if (file_exists($path)){ //file exists } else { //file does not exist }
-
When you download a page via "save link as" you get the raw HTML that was created from the PHP, not the PHP source itself. If people could just download the page and get the PHP, people could just steal the code of sites like Facebook
-
oh like a table, something like echo '<table border="1"><tr>'; $count = 1; while($row = mysql_fetch_array($query)){ echo "<td>".$row['column']."</td>"; if ($count % 2 == 0){ echo "</tr><tr>"; } $count++; } if ($count %2 == 0){ echo "</tr>"; } echo "</table>"; should work
-
missed an equal sign
-
Setting up my OWN forums! (from Scratch)
mikesta707 replied to DarrenReeder's topic in PHP Coding Help
Just curious, but why are you creating one from scratch? If it is for a your site, why not just use one of the many pieces of free forum software? If it for fun, or for whatever reason, than good luck. Making a good one would be pretty difficult, but an easy one isn't too hard to understand http://www.phpeasystep.com/phptu/12.html Thats a pretty good tutorial -
of course not, its in the hands of the Jews, and the reptilian overlords!