Jump to content

spiderwell

Members
  • Posts

    1,008
  • Joined

  • Last visited

Everything posted by spiderwell

  1. error trapping, its the bulk of a programmer's work. its 10% building a script and 90% preventing users from breaking it
  2. i cant work out the class/planet/ship deal. mostly because of this statement: Depending on what type of ship is added (Class 1-4 ship) its corresponding Class is determined. The planet table is different though as it can have any number of Class 1 - 4 ships.
  3. blank page should only occur if no data has returned from the initial select statement, i suspect you pressed back in your browser and have tried to delete the same record
  4. yeah there will be one that checks against only ' slash or space' , thats all you will need.
  5. and I should have looked closer at your code and my answer, remove the extra mysql_fetch_array($result); between the first 2 echo "Hi" statements
  6. lots of nasty nested if conditions! ...anyway the registration goes to fff.html, back tracking from there I noticed you store your SQL INSERT statement in $aql, and then execute using $sql, typo perhaps?
  7. a feel a regular expression expert will answer this, i have a convoluted solution that would use explode() to split string to an array using the slash as the delimiter, then do a ctype_alpha() check on each element of array. I so need to learn reg exp...
  8. i dont think you need the ($adopt == $row['id']) for a start as that will always be true anyway. you missed out passing the record set result to $row <?php $con = mysql_connect("localhost","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("a8784hos_adopts", $con); $adopt = $_POST['adoptid']; $uniquecode = $_POST['uniquecode']; $result = mysql_query("SELECT uniquecode, id FROM id WHERE id='$adopt'"); mysql_fetch_array($result); while ($row = mysql_fetch_array($result)){ if ($uniquecode == $row['uniquecode']){ mysql_query("DELETE FROM id WHERE id='$adopt'"); echo 'Done! <br/><br/><a href="tester.php">Go back....</a>'; } else { echo 'Bad unique code. <br/><br/><a href="tester.php">Go back....</a>'; } } ?>
  9. this should be in the javascript section really... but it looks like the appended fields also have their own form tags, which makes them seperate forms ergo wont be affected by the reset button from the original form
  10. surely its been blocked for a reason, and you should be working not trolling besides wouldnt a proxy site do the job for you? or they all blocked too?
  11. stop sending them. you need to contact your hosts and find out how many mails can be sent at once/over a period or ask them about how to do large mailshots for your site. most hosts have some kind of throttle on number of emails sent as standard anti spam procedures
  12. if it was me, I would use htmlspecial chars first then escape, but I have no idea if that is correct, and if indeed there is a correct order
  13. how do you want the submission done, via a form or a link usually link is GET method, and you will see the info in the address bar form is POST method, and info is hidden when sent.
  14. you are trying to retrieve using $_POST which is POST method in a form, but the long urlstring is using $_GET method. also raw form data into sql statement leaves you wide open to sql injection
  15. thats because there is no condition attached to the output of that message, you should put it and the sql execution inside the if($_POST['submit']) so it only executes when the form has been posted
  16. ok sorry i misread your part about the update, so ignore that part , revert the query back. what does it actually echo in the image tag when you view source?
  17. i dont think you need the single quotes around the echo statement, but you do need them around the $data array, try $PlayerDefaultSkin = $data['PlayerDefaultSkin']; <img src="skins/<?php echo $PlayerDefaultSkin; ?>.png"> also check src path, is it /skins/ or just skins/
  18. hehe beat me to it! also i thought you had to use || not OR or can you use either
  19. the reason that !$somevariable doesn'tt work is because that is the test for that variable to be false not say empty, which is what I think is what you are trying to do. change say if(!$username) to if($username == '')
  20. some sort of regular expression should do it, but I'm no good at those, someone will be along soon how is good at them
  21. i would suggest its done in ajax or jquery, which is essentially javascript. java would work but i hate that crap
  22. one of the 3 or more is incorrect, otherwise it would connect, I suggest contacting the universtiy network administrator to confirm the name of the server, username and password. are you muddling the server name with the name of the database?
  23. im lost to what help you are after now, as you stated you have stopped completely with it, and so im not sure what you are trying to do any more!
  24. its all ok really, only thing i would change myself is name the form fields differently rather than just input7,input8 etc
  25. yes ALTER will allow you to do that
×
×
  • 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.