Jump to content

ldb358

Members
  • Posts

    199
  • Joined

  • Last visited

    Never

Everything posted by ldb358

  1. i thnk this shoud work: var time = document.getElementById("yourElement"); time.innerHtml = 30; //then later time.innerHtml = seconds+"."+milisec you can use this is a variety of elements linke div, span, ect. just put the elements id where it says yourElement
  2. what i would like to to do is be able to(for the people with javascript off) have the link link to an alternative page, right now the page has a drop down box with form in it heres what i have: <a href='index.php?action=comment&id=$id' id='$i' onclick='grow($i,".$photo['id'].")'>rate and comment</a> the problum is it goes directly to the link instead of running the javascript thanks in advance
  3. there a sticky in this section about that, personally i use komodo edit its free plus saves the names of all your functions and variables, has syntax checking and has a lot of the built in php function built in
  4. the only thing i have seen is http://www.shadowbox-js.com/ and from looking at the src it looks like it might be able to be adapted becacuse what is show is shown in a td(this is from the site source its self) so you just throw you loggin form on there and it should work edit: theres accually an exapmple of it on the bottom
  5. cant you just search in curtain catagories in a table upload the login script and maybe i can help
  6. $qscores = mysql_query("SELECT * FROM tblname"); $i=0; while($previousscore = mysql_fetch_array($qscores)){ $random = "";//set random score $final = $previousscore['score'] + $random; mysql_query("INSERT INTO tblname (score) VALUE($final)"); } //retrive results $q = mysql_query("SELECT * FROM tblname ORDER BY score"); //change score to match the colum the scores in $i = 0; //only if storeing in a array while($results = mysql_fetch_array($q)){ //code to out output the scores echo $results['score']; //or store into an array $array[$i] = $results['score']; $i++; }
  7. ive never used php bb but id assume that it is connected to a database in which case you just change the table that it loads the users off of to the same one your site uses or vise versa depending on which is easier
  8. if i understand what you are trying to do your already inserting your values in to the table so this should work: $q = mysql_query("SELECT * FROM tblname ORDER BY score"); //change score to match the colum the scores in $i = 0; //only if storeing in a array while($results = mysql_fetch_array($q)){ //code to out output the scores echo $results['score']; //or store into an array $array[$i] = $results['score']; $i++; }
  9. okay thanks did that can some one test it again to if it still will let you upload a file
  10. i dont get what you mean by messing with the MIME how can i fix that i hve it check the file type in my script?
  11. if i understand your question i think should do it: if($defects_info['desc'] != ""){ $desc = "(" . $defects_info['desc'] . ")"; }else{ $desc = ""; }
  12. okay the site has been moved again to http://lbflash.com Ive been try to getting the security updated I'm writing an email verification, but i didn't quite get how to use URL encode or more where to use it. also about the logout button being there i tried to write a function to change it in between logging in and logging out but i ran into the problem, my function that loads the header is called separately and before the rest of the page that means that on the first page loaded after logging in or out it would be backwards which i think would be more confusing for the user any way if anyone finds and security risks let me know and if some one code tell me where to use the encode/decode that would be nice too
  13. okay i will do that right now Ive been working on a redesign for it so there hasn't been any real changes but ill make sure to do that
  14. i dont have flash installed eather but i was still able to get around and based on the link i knew it was a porfolio site, personally i felt that there was to much color on the site. also very nice 3d modeling
  15. Okay thanks everyone i got it all i had to do was get rid of the where's and the * i didnt need to add anything
  16. I don't know how to get rid of multiple Where's that the problem I'm at now, finding an alternative
  17. and about the mysql escape string the input isnt user input it made by the script in order to delete a friend request after it is accepted
  18. hmm i think you may be right i removed the * but I'm still getting the same error any ideas on how to compare it to multiple columns
  19. what i need to do is delete a single entry from a table but i need to get the exact message that need to be deleted to do this i want to delete the row with the subject, sender and reciver( its a automated friend request always the same) heres what i have come up with: mysql_query("DELETE * FROM messages WHERE sendto='$username2' AND WHERE sentfrom='$username' AND WHERE subject='$subject'") or die(mysql_error()); this generates this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM messages WHERE sendto='lane3' AND WHERE sentfrom='lane' AND WHERE subject' at line 1
  20. okay thank you every one ill look in to removing the the logout button and fixed those secerity issues
  21. thanks all for your feed back, the site has been moved to the main domain at http://lbflash.summerhost.info
  22. hi i am working on a very basic ajax script but for some reason its not working the script is simply put check if a username is a available so that the user doesn't have to submit the whole form to know is the username is available heres the html script: <html> <head> <link href='smartform.css' type='text/css' rel='stylesheet'/> <script src='smartform.js' type='text/javascript'></script> </head> <body> <form> username:<input type='text' id='username' onchange='checkUsername()'/><div id="cUsername"></div><br/> password:<input type='text' id='password'/><br/> confirm password:<input type='text' id='vPassword'/><br/> first name:<input type='text' id='fName'/><br/> last name:<input type='text' id='lName'/><br/> email:<input type='text' id='email'/><br/> <input type='submit' value='register' /> </form> </body> </html> now the javascript file: var xmlhttp = newHttpObject(); function checkUsername(){ var username = document.getElementById("username").value; var div1 = document.getElementById("cUsername"); sendUsername(username); if(xmlhttp == null){ div1.innerHTML = ""; } } function sendUsername(username){ var url = "http://lbflash.summerhost.info/smartform.php?username=" + username; var type = "GET"; xmlhttp.open(type,url,true); xmlhttp.onreadystatechange = response; xmlhttp.send(null); } function response(){ if(xmlhttp.readyState == 4){ if(xmlhttp.responseText > "0"){ div1.innerHTML = "<img src='x.png' style='margin-left:5px;margin-right:5px;'/>taken"; }else if(xmlhttp.responseText == "0"){ div1.innerHTML = "<img src='checkmark.png' style='margin-left:5px;margin-right:5px;'/>not taken"; } } } function newHttpObject(){ if (window.XMLHttpRequest){ return new XMLHttpRequest(); } if (window.ActiveXObject){ return new ActiveXObject("Microsoft.XMLHTTP"); }else{ return null; } } now the php file: <?php include('db.php'); $username = $_REQUEST['username']; $check = mysql_query("SELECT * FROM users WHERE username='$username'"); $results = mysql_num_rows($check); echo $results; ?> whats wrong? Thanks in advanced
  23. Okay thanks for the article it help alot
  24. thanks for the article don't know if i get it all the way but im working on it thanks
×
×
  • 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.