Jump to content

rajivgonsalves

Members
  • Posts

    2,166
  • Joined

  • Last visited

    Never

Everything posted by rajivgonsalves

  1. Yeah used it too its cool
  2. try this text = text.replace(/y/g, 'why')
  3. use str_replace on the data http://php.net/str_replace
  4. Is your page hosted on a web server or on your local machine
  5. because $i will never get increment so while ($i < $length) will always be true
  6. Yes but the following code will go in an infinite loop if (!strstr($password, $char)) { $password .= $char; $i++; } because all 0-9 numbers will be used and then it will keep on looping
  7. it depends how many user u go try this following code, also one thing do you have ob_start() in your config file <?php //Connect to My Gaming Ladder database include('config/config.php'); $query = mysql_query("SELECT * FROM users") or die("Error: ".mysql_error()); //How many MGL users are there? $numusers = mysql_num_rows($query); include('community/Settings.php'); $hdlComDataBase = mysql_connect($db_server, $db_user, $db_passwd,true) or die("Could not connect to SMF database server: ".mysql_error()); mysql_select_db($db_name,$hdlComDataBase) or die("Could not select SMF database: ".mysql_error()); if($numusers == 0){ "There are no users registered on My Gaming Ladder."; } else { while($fetch=mysql_fetch_array($query, MYSQL_ASSOC)){ $id=$fetch["id"]; $alias=$fetch["alias"]; $pass=$fetch["pass"]; $email=$fetch["email"]; $icq=$fetch["icq"]; $aim=$fetch["$aim"]; $msn=$fetch["msn"]; $yahoo=$fetch["yahoo"]; $website=$fetch["website"]; $ipaddress=$fetch["ipaddress"]; echo "Converting MGL member <b>$alias</b> to SMF... "; //Connect to SMF database $query2 = mysql_query("SELECT * FROM smf_members WHERE memberName = '$alias'", $hdlComDataBase) or die("Could not search users: ".mysql_error()); $exists = mysql_num_rows($query2); //If the selected user doesn't exist in the SMF forum database... if($exists==0){ $query3 = "INSERT INTO smf_members (memberName,passwd,emailAddress,websiteUrl,ICQ,AIM,YIM,MSN,memberIP) values ('$alias', '$pass', '$email', '$website', '$icq', '$aim', '$yahoo', '$msn', '$ipaddress')"; //If the query is successfull if(mysql_query($query3,$hdlComDataBase)){ echo "Added MGL member <b>$alias</b> to the SMF forum database."; //Otherwise... } else { echo "There was an error adding the MGL member <b>$alias</b> to the SMF forum database."; } } else { echo "The MGL member <b>$alias</b> was not added because he/she is already a member of the SMF forum."; } } } ?>
  8. well you connecting to another database so your link should be new $newlink = mysql_connect($db_server, $db_user, $db_passwd,true) or die("Could not connect to SMF database server: ".mysql_error()); mysql_select_db($db_name,$newlink) or die("Could not select SMF database: ".mysql_error()); $query2 = mysql_query("SELECT * FROM smf_members WHERE memberName = '$alias'",$newlink) or die("Could not search users: ".mysql_error()); $exists = mysql_num_rows($query2); and mysql_query($query3,$newlink)
  9. instead of echo "$blcktime:$blckmins"; try $intSeconds = ($blcktime*3600)+($blckmins*60); echo floor($intSeconds/3600).":".floor($intSeconds/60)%60;
  10. it will hang if you choose activation code as number because of this if (!strstr($password, $char)) { $password .= $char; $i++; } you have only 10 numbers and they cannot repeat so how will you generate a 13 digit activation code ?
  11. try using your PC name instead of localhost
  12. this has got to do with the mysql server settings read more at http://dev.mysql.com/doc/refman/5.0/en/adding-users.html you hostname has to exists for that username in the hosts table of the mysql database
  13. you can read the following http://www.evolt.org/article/comment/17/60265/index.html
  14. put it in the popup window little change in code <script> if (parent) { parent.document.location.href = "http://..."; } </script>
  15. well pocobueno1388 has the right approach if your try something advance try the soundex http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_soundex
  16. you forgot the break case '3': $MessageID = $rowthree['MessageID']; $Update = "UPDATE messages SET Status = '3' WHERE MessageID='$MessageID'"; $result = mysql_query($Update) or die(mysql_error()); break; default: die ("invalid message selected"); break;
  17. try this for that one line echo "<td href='javascript:void(0);' onmouseover=\"return overlib(showRest2('" . $row[18] . "' ,'" . $row[3] ."'), MOUSEOFF, BACKGROUND);\" onmouseout=\"return nd();\">link</td>";
  18. ok got it try this if (!empty($_POST)) { sendMail(); } instead of sendMail();
  19. can you put some chucks of your code maybe more than 5 lines before and after its echoed ?
  20. Ok if you could give an explaination of your registration and which function is called on which page it would be helpful.
×
×
  • 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.