Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. see this? while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { foreach ($line as $col_value) { // Inculde the phpcrawl-mainclass include("classes/phpcrawler.class.php"); as you can see you have your class file in a loop you only need it once so place it outside your loop from a class you can create an object and putting the class file in a loop is pointless thast why you get the error cant redeclare class
  2. try looking up some json remote examples. what you do with json is calling php to return an js array which is then usuable on your mainpage. because its javascript you can easily update variable things
  3. i think you have not set your apache server or iis server right if you want something easy install xampp
  4. Neat!!! great article thanks for the post
  5. if you want an easy way you could just open up a new page with addition fields for the user names and emails. so the button would be just a link <a href="addmoreppl.php" >add more ppl</a> ofcourse this would ahve a side effect of you losing entered data. for the multiple inserts and post varibles i would use an input array <form action="page.php" method="post" > <input name="first_name[]" /> <input name="first_name[]" /> <input name="first_name[]" /> this will result in posting an array page.php //if all fields were entered this would echo 3 names foreach($_POST['first_name'] as $name){ echo($name); }
  6. you can do a couple of things 1. try in phpmyadmin or mysql query browser if that sql returns a record (i think it returns multiple fields this way you can be sure) 2. echo your $ban var 3. only select the field you need $query = "SELECT ip_field_name FROM darkflame_ban WHERE ip ='$ip' LIMIT 0,1"; and the php was actually correct in your previous if ($ip == $ban){ }
  7. i got a hunch that $ban var is an array with a couple of fields or one field name try this <pre> <?php print_r($ban); ?> </pre> you probably should do the check like so <?php if($ban['ip']){ //ban yer butt } ?>
  8. if you want some fancy gallery scripts try looking up some prototype or mootools gallery scripts those are usually great looking and tons of those have good documentation. this seems like jquery or dojo frameworks or something im not familiar with it
  9. well for 1 i see you have the functions and variables starting with a number. Javascript doesnt like that. I think not any scripting or programming language allows this. so remove the numbers from the start at the functions and variables and you can place the numbers at the end i think. Next you need a debugger for you browser i dont use ie for debugging since ie has horrible debugging tools for the stuff that i found. and ie 8 will have better tools for this. but anyway try installing either firebug http://www.getfirebug.com/(recommended) or the webdeveloper pluging for firefox https://addons.mozilla.org/nl/firefox/addon/60 that will make you able to track the errors quicker also i see its the same function and varables a couple of times why dont you just rewrite your function so it can be called multiple times and just need the function one time .
  10. maybe this can help you http://demos.mootools.net/DragDrop
  11. actually only active-x makes that popup appear and javascript popups. But you shouldnt use js popups and activex anyway. popups are annoying and activex only runs on ie and its a bit pointless to create sites that work on ie only these days
  12. memory usage isnt an issue but its a lot cleaner if you use includes and a lot more maintainable
  13. here is a start for you <script> function setCheckBox(){ if(document.getElementById('main_checkbox').checked){ document.getElementById('my_checkbox').setAttribute('checked','checked'); }else{ document.getElementById('my_checkbox').removeAttribute('checked'); } } </script> subcheckbox <input type="checkbox" id="my_checkbox" /><br /> main checkbox <input type="checkbox" id="main_checkbox" onChange="setCheckBox()" /><br />
  14. if you think it might be the javascript that has errors try viewing the source in your browser thats easier to read and shows just javascipt and html
  15. you could just use a str_replace to replace the & with a ascii character &#38; that would still display correct html and would solve your get method
  16. why use javascript in your gallery? Seems to me you want to have your gallery divided into seperate pages. try looking up php pagination. javascript can be used to create animations other then that you dont really need it
  17. you will always need javascript for that since php runs on the server and doesnt know a thing about your computer settings
  18. how do you click a backspace button o.0 but anyway you should use a function that validates a number with the blur event <input onblur="checkNumber()" />
  19. that would mean sorta hacking into photobucket i guess. I think there is 2 things you could do. 1. iframe the upload page of photobucket. 2. check the name attributes in the form of photobucket and create a form that uploads to photobucket.com i doubt this will work most likely they secured their site only allowing posts from their own domain
  20. this is not really a javascript issue what you really need is serverside validation. when certain fields are empty or incorrect you should retrieve the posted data and show the form again. this is php related. you can validate your form using javascript however you should always use serverside validation and javascript to create a more user friendly experience. look up php form validation tutorials
  21. depends on what you call youre back button if it is an html button with that function as event it should work . if you are trying to control a browser button that wouldnt work at all
  22. actually i just made that to simplify my situation. The description field is usually one line of human readable text. and i want to filter the words from it.
  23. Ok maybe someone can help me with this one. I have a table with recipies and one of the fields is called description recipy_id|recipy_name|recipy_description 1|fruit pie|apple banana pears plumes 2|soup|basel tomatoes 3|blt|bacon lettuce tomato now i want to perform a select query which will get the words depending on the input for example perform a select words from recipies where description like %b this should return basil, banana , bacon how can i achieve this?
  24. so basically you want to do an insert if the entry doesnt exist. why not just do a select before you insert anything
  25. dude seriously dont place passwords. and besides i think your searchin for simply uploading a file to your server you dont need a ftp protocol for that try searching without the ftp
×
×
  • 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.