Jump to content

Andy-H

Members
  • Posts

    2,000
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Andy-H

  1. No, it's just simply un-necissary and may escape some of the characters they have chosen for their password....
  2. The password gets encrypted so doesnt need mysql_real_escape_string();
  3. Why try and help people with this stuff, and don't show them how to do it properly. If they find it hard to understand, just keep the code neat and add comments to explain EVERYTHING. Showing people how to code and showing bad programming practice defeats the object of helping them in the first place...
  4. Is the data displayed on screen or inserted into a database? Or does it simply just send to the mobile?
  5. Can you show us the code where you display the data? It cant be raw postdata if its adding slashes to quotation marks and stuff.
  6. thanks
  7. Just for a text based MORPG?
  8. What is the best practice for connecting to, selecting and querying a database in MySQL. Thanks for any replies.
  9. deleted it now
  10. Where does the get data come from?
  11. I used to use this lol Its from ages ago so it's a bit crap lol <?php function sqlErr($line = NULL,$file = NULL,$err = NULL){ echo '<link rel="stylesheet" type="text/css" href="style.css" />'; $l = "<font color='red'><strong>A SYNTAX error has occured, please read on...<br /><br />"; if ($err != NULL){ $l1 = "Error: ".$err."<br /><br />"; }else{ $l1 = ""; } if ($file != NULL){ $l2 = "File: ".$file."<br /><br />"; }else{ $l1 = ""; } if ($line != NULL){ $l3 = "Line: ".$line."<br /><br />"; }else{ $l3 = ""; } $l4 = "Please report this to an administrator.</strong></font>"; $fullLine = $l.$l1.$l2.$l3.$l4; $return = '<table width="500" height="300" border="1" cellspacing="0" cellpadding="0" valign="middle" align="center" bordercolor="red"> <tr><td align="center"><h3><font color="red"><strong>[ ERROR ]</strong></font></h3></td></tr> <tr><td align="center">'.$fullLine.'</td></tr> </table>'; return $return; } function displayError($errormsg = NULL){ if ( (!empty($errormsg)) && ($errormsg != NULL) ){ echo '<center><fieldset class="fieldset" width="500"><legend><strong><font color="red">Error:</strong></legend>'.$errormsg.'</font></fieldset></center>'; } } function displayUpdate($successMsg = NULL){ if ( (!empty($successMsg)) && ($successMsg != NULL) ){ echo '<center><fieldset class="fieldset" width="500"><legend><strong><font color="green">Error:</strong></legend>'.$successMsg.'</font></fieldset></center>'; } } mysql_query($query)or die(sqlErr(__LINE__.__FILE__.mysql_error())); ?>
  12. Its just basically a variable which needs to be assigned the path to your files, as you see it is called later... <?php define("INC_DIR", "/home/yoursite/public_html/inc/"); define("PAG_DIR", INC_DIR."pages/"); define("INC_DB", INC_DIR."db.php"); ?> So in effect PAG_DIR will become: "/home/yoursite/public_html/inc/pages/" And INC_DB will become: "/home/yoursite/public_html/inc/db.php"; You get the idea?
  13. <?php if (isset($_POST['submit'])) { //connect to MySQL and select database to use $connection = mysql_connect("localhost","uname","PW") or die(mysql_error()); $db = mysql_select_db($db_name,$connection) or die(mysql_error()); $username = mysql_real_escape_string($_POST['loginemail'], $connection); $userpw = mysql_real_escape_string($_POST['loginpw'], $connection); $sql = "SELECT loginemail,loginpw FROM RegistrationForm WHERE loginemail = '$username' AND loginpw = '$userpw'"; $result = mysql_query($sql, $connection); if (mysql_num_rows($result) != 0) { session_start(); $_SESSION['logged'] = true; header("Location: console.php"); } else { header("Location: index.php?error=x"); } } ?> Does that work?
  14. Maybe something like that? <? define("SCRIPTNAME", "cbhack.info/offer"); define("BASEHREF", "http://www.cbhack.info/offer"); define("DOMAIN", "localhost"); define("FROMEMAIL", "[email protected]"); define("SITENAME", "CBhack"); define("INC_DIR", "/home/cpanelUsername/public_html/offer/"); define("PAG_DIR", INC_DIR."pages/"); define("INC_DB", INC_DIR."db.php"); define("MYSQLUSER", "cpaneluser_sqluser"); // mysql username define("MYSQLPASS", "YourMysqlPass"); // mysql password define("MYSQLDB", "cpaneluser_dbname"); // mysql database name require(INC_DB); ?>
  15. Do you have a link to this website? Add me on msn [email protected]
  16. Andy-H

    Php country

    I'm sure you could copy a select box from some other site, is the flag really relevant? I'm sure people won't need a visual aid to help them tell you what country they live in.
  17. Have you purchased a domain name for this website or are you using the root IP/a subdomain? Base HREF is the link you your site and INC_DB is the path in which you database connection file is stored (I assume) This should also be in 3rd party scripts.
  18. Round should be better (obviously as it rounds it up to the nearest thousandth in this case).
  19. round($var, 3); number_format($var, 3); Will display the 0 too tho.
  20. function findObj(n, d=FALSE) { var p,i,x; if(!d || d=FALSE) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } ???
  21. Third_Degree, I just watched your breast enlargement tutorial; whats with the heavy breathing and constant swallowing due to increased salivating? LMAO...
  22. Could you be a little more specific delickate?
  23. Oh, my bad, didn't know you meant an actual web page to pop-up. I know in an overlib you can set the display in the file itself. Not sure if you can get an overlib that big anyway lol.
  24. Your best bet would be to use a JavaScript overLib I think and use onMouseOver. I dont know of a way to make a PHP pop-up window and doubt there is one since PHP is a server-side language...
×
×
  • 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.