Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. I've never seen an install/configure progress bar that works correctly. They all seem to do that. Hell, the XP install pauses at the same 'time left' points every time you install it!
  2. Yep. Sounds good to me. Not as far as I know. No. The function takes one optional parameter - the mysql connection. You could have answered that for yourself by looking on the manual page.
  3. I agree. Though i do find the sheer number of updates windows does quite staggering. Makes you think how awful it must be without those updates!
  4. Sessions shouldn't be a problem, since they store a cookie to track the session ID and you're allowing for cookies. However, have you tried echoing curl_error() ? Also, you may want to take a look at using the live HTTP headers extension for firefox. It shows you exactly whats being sent and returned to/from the server. It's useful to compare your manual request with the automated cURL request to make sure there's no differences. You could also try making your request look more normal - provide a user agent, referrer etc.
  5. You might want to browse directly to thumbnail.php?im=path_to_image and see if there are any errors generated. You probably ought to encode the image path before it's passed in the URL and decode it in thumbnail.php too, though i don't think that is likely to be causing the error.
  6. I'm not too sure what all those <table> tags are about... But take a look at this thread/FAQ here Oh, and also, when you post you code can you use the tags please - makes it much easier to read.
  7. Your code relies on the register_globals setting being turned on. Try changing this line: $orig_image = imagecreatefromjpeg($im); To: $orig_image = imagecreatefromjpeg($_GET['im']);
  8. Are you displaying your errors to the user? If you are, there's not much point in checking the affected rows, since you throw an error if the INSERT query fails. If your not displaying your errors, you could always make the call to mysql_affected_rows() 3 times - once after each query - and increase a counter with its result. Check that counter at the end. It should equal 3. Of course, the above wouldn't tell you which query failed, but what you do depends how you want it to work.
  9. Why you'd want to have what is effectively two logins is beyond me... However, you can handle it with sessions though. You can set a session on successful completion of this ID stage, and check that on the other pages. If that session isn't present, redirect to the ID page. I have to say, your code to check this ID doesn't appear to make a lot of sense. As far as i can see, it doesn't take any input from the user.
  10. That the default behaviour for sessions anyway.
  11. That woudl be because you only execute the query outside of your loop - move the call to mysql_query() inside.
  12. Why can't you include it? If there's a reason, you'll need to copy the relevant part from the included file so that $user and $pass are defined.
  13. Unfortunately, that is because your database structure is all wrong. You should read up on database normalization (this topic here should get you started) Basically, you need to have a separate table for your images. You can then store which user the image is for, the date it was updated, views etc for each image. If your unsure as to why this is so, consider what would happen with your current structure if you decided to increase the number of images allowed per user.
  14. Presumably you either define $user and $pass on the other pages, or include a file which does?
  15. You could read the contents of the popup(that is, the webpage the popup contains) with PHP, either with file_get_contents() or with cURL You could use some AJAX to link to a file which does the above, and updates your main page. Seems a touch pointless though.
  16. There you go then. $user and $pass are undefined.
  17. It would help if you posted your database structure. What links the two tables?
  18. Sorry, my fault (but i do have a excuse, im ill). Try: <?php $astat = mysql_fetch_array(mysql_query("select * from players where user='$user' and pass='$pass'")); //becomes: $sql = "select * from players where user='$user' and pass='$pass'"; $result = mysql_query($sql) or die(mysql_error()); $astat = mysql_fetch_assoc($result); echo '<br />Query:'.$sql.'<br />'; echo '<pre>'.print_r($astat,1).'</pre>'; ?>
  19. Debug and print the query and row. Sounds like it isn't selecting the correct row or there's a difference in fields names: <?php $astat = mysql_fetch_array(mysql_query("select * from players where user='$user' and pass='$pass'")); //becomes: $sql = "select * from players where user='$user' and pass='$pass'"; $result = mysql_query($sql) or die(mysql_error()); $astat = mysql_fetch_assoc($result); echo '<br />Query:'.$sql.'<br />'; echo '<pre>'.print_r($astat,1).'</pre>'; ?>
  20. How about you try and modify your code? If you can't get it to work, show us what you've done, and we'll point you in the right direction.
  21. Great stuff - though if this isn't a one-off, you wont know if you've solved the problem until you run this and it takes a similar amount of time again. Hopefully it's sorted, however.
  22. Just as a quick example: <?php foreach($_POST['attendance'] as $k=> $v) { echo 'Student'.$k.' was present'; } ?>
  23. 0 should be fine. It might be worth setting PHP to ignore a user abort. I seem to remember some issues with scripts taking a long time to execute relating to this setting, though i can't find anything to confirm that at the moment. If you want to give it a try, add this: ignore_user_abort(TRUE); To the top of your script. I think the idea goes something like that if the browser doesn't recieve any information for a while, it terminates the session. I could be talking rubbish here though - as i say, its just a vague recolection.
  24. <td class="Body"> <?php echo $account["WalkNo"]; echo ' <a href="JoinWalk.php?WalkNo='.$account['WalkNo'].'">Join Walk</a>'; ?></td> Is that what you wanted?
  25. So you thought you'd bump your post instead? Smooth... Anyways, if you want someone to do this for you, you'd be better off heading over to the freelance forum.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.