-
Posts
2,000 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Andy-H
-
No, it's just simply un-necissary and may escape some of the characters they have chosen for their password....
-
The password gets encrypted so doesnt need mysql_real_escape_string();
-
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...
-
Is the data displayed on screen or inserted into a database? Or does it simply just send to the mobile?
-
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.
-
Just for a text based MORPG?
-
What is the best practice for connecting to, selecting and querying a database in MySQL. Thanks for any replies.
-
Where does the get data come from?
-
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())); ?>
-
need assistance with authenticating username and PW
Andy-H replied to webguync's topic in PHP Coding Help
Duno... -
somebody please help, need help installing script
Andy-H replied to jdock1's topic in Third Party Scripts
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? -
need assistance with authenticating username and PW
Andy-H replied to webguync's topic in PHP Coding Help
<?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? -
somebody please help, need help installing script
Andy-H replied to jdock1's topic in Third Party Scripts
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); ?> -
somebody please help, need help installing script
Andy-H replied to jdock1's topic in Third Party Scripts
Do you have a link to this website? Add me on msn [email protected] -
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.
-
somebody please help, need help installing script
Andy-H replied to jdock1's topic in Third Party Scripts
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. -
[SOLVED] How can I force .800 to show instead of just .8 ?
Andy-H replied to blurredvision's topic in PHP Coding Help
Round should be better (obviously as it rounds it up to the nearest thousandth in this case). -
[SOLVED] How can I force .800 to show instead of just .8 ?
Andy-H replied to blurredvision's topic in PHP Coding Help
round($var, 3); number_format($var, 3); Will display the 0 too tho. -
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; } ???
-
Third_Degree, I just watched your breast enlargement tutorial; whats with the heavy breathing and constant swallowing due to increased salivating? LMAO...
-
Could you be a little more specific delickate?
-
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.
-
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...