Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. plz do i would love some nice links of a descent db class that manages postgress mysql and sqlite. I know i could google it up but just curious about everyones experience with db classes. also i do agree that the select update insert are all just a sql query only thing that is probably different is to get a single row from a db instead of multiple ones
  2. I agree that in most casses a form class wouldnt be usefull. however if you have build pages that uses forms all the time it kinda gets tiring to go through the whole process of building in the validation all over again. I've been building my form class for quiete a while now and made tons of mistakes in the start but its finally comming together now and building a form is now just 5 min work for both server and clientside form validation even if the form is huge
  3. just because youre using a framework doesn't mean you are understanding javascript less. I use mootools or prototype. it makes cross browser ajax a lot easier and gives cleaner code so you can focus on the thing that really matters which is using javascript to make something work
  4. here is a start for you <script> function setInput(passedValue){ document.getElementById('input2').value=passedValue; } </script> <form> <input onkeyup="setInput(this.value)" type="text" id="input1" /> <input type="text" id="input2" /> </form>
  5. dunno if it can be found online but this one should be pretty easy to make by yourself using the document.getElmenetById() function
  6. i dont think that is flash or php thats causing that. thats because youre mail server checks the mail every 10 min and sends it. it must be in a queue of some sort
  7. Hmmm are you trying to create an app using flash ,php and mysql. if so i wouldnt really bother using xml or any of that just take a look at amfphp that will get rid of annoying xml
  8. you place it around every posted variable since that could be the input of potention danger mysql_real_escape_string($_POST['username'])
  9. i tried various form classes and a lot actually really sucked but i have found one that was worth using and have been expanding this class for a year or so. in the end it saved me tons on time validating forms and produce cleaner code. oop can be helpfull but just use it when it needed in your case it can be extremely usefull. if youre form class seems to be too diffucult try this one. i have used it and it was pretty usefull http://www.finalwebsites.com/snippets.php?id=15
  10. no you just prevent injections by using the function on the post variables <?php $about_me = mysql_real_escape_string( $_POST['about_me']); ?>
  11. its not really an upload but more as a register form. but anyway just use mysql_real_escape_string() to prevent sql injections and youre safe
  12. like this perhaps? http://demos.mootools.net/Fx.Scroll
  13. plz dont crosspost http://www.phpfreaks.com/forums/index.php/topic,197481.0.html
  14. always use server side validation as well youre ajax validation should only be used to improve user experience since javascript can simply be turned off. as for ajax validation why use ajax and not just javascript without the ajax. ajax validation is a bit tricky
  15. its pretty straight forward only thing you needed to do is add the slash as i explained in my first post <?php include("/BigC/config/config.php") ?>
  16. seems like the path was incorrect if this is the location of your config file C:\xampp\htdocs\root\config\config.php" then it should be <?php include ('/root/config/config.php'); ?> your C:\xampp\htdocs\ is the website root
  17. you could just refer to the base of your website by adding a slash infront of it <?php include("/config/config.php"); ?> the extra slash will go to your website root easy as cake huh
  18. i think you where looking for the eval() function just be carefull on what you use it on it could be a security breach of you use it for a website
  19. how to start learning php is pretty much just a preference of how to. Some like to get a book and take their time while studieng it. I prefer the trial and error way just experiment with php and see what it does and learn from your mistakes. w3cschools has a ok tutorial about learning php and so does this site under the tutorial section. just look around online and search for php tutorials. the basic one is (yeah ofcourse) "hello word" from there on learn your if else , switch and loops and you'll be fine
  20. nah dont worry bout the code tags thing just use it for future usage did you do the echo the sql after the loop or before if its after then youre right it means the loop is correct otherwise place the echo($sql) after the loop to see what it does
  21. try to echo your $sql var that will make the query visible and able to track the problem and plz use the [ code ] [/ code ] tags so the code is highlighted
  22. hmmm the modify button dissapeared oh well anyway try this havent tested it <?php $con = mysql_connect("xxx","xx","xx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xxx", $con); $sql="INSERT INTO guests (guest_name, guest_email) VALUES"; for($i=0;$i<sizeof($_POST['username']);$i++){ $sql.="('".mysql_real_escape_string($_POST['username'][$i])."','".mysql_real_escape_string($_POST['email'][$i])."')"; if(!$i==sizeof($_POST['username'])){ $sql.=","; } } // if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "record added"; ?>
  23. @947740 i always use firefox i dont like ie much and firefox has better js debugging tools @kevgais yeah the post values are a array so you need to treat them as such you will need a loop create a query
  24. just check out your browsers source and see whats in it its more html related then php
×
×
  • 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.