Jump to content

parino_esquilado

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Everything posted by parino_esquilado

  1. I'm sure you must have an ID field preceding the 'username' field, but to be sure, could you edit this line: mysql_query($q); to mysql_query($q) or die(mysql_error()); and see what crops up
  2. Sorry if I sound stupid, but due to the random nature of the hashing process, won't your $salt change each time it is called. $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz1234567890"; $rand = str_shuffle($alpha); $salt = substr($rand,0,40); $hashed_password = sha1($salt . $_POST['password']);
  3. if(!mysql_select_db($database) You are missing a bracket on line 12. It should be: if(!mysql_select_db($database))
  4. Read the facebook documentation associated with it's application API. I have never used this API, therefore cannot help you in that respect, though I do hope you the best in working that one out
  5. http://www.w3schools.com/php/php_intro.asp Start there, you need to lay the foundations of your knowledge before you can build on them.
  6. $add_sql = "INSERT INTO tbl_customer (od_payment_postal_code) VALUES('".$_POST["txtPaymentPostalCode"]."')"; is the only ever value that will be inputted into your database. $add_sql is repeatedly overwritten until it is finally executed.
  7. To create a dynamic variable you need to wrap the second dollar with {} curly braces: <?php $variableName = "a1"; ${$variableName} = 100; ?> which would create a an $a1 variable with the value of 100 ($a1 = 100).
  8. <?php class a { var $things; public function __construct($stuff) { $this->things = new b; } } class b { var $morethings; $this->morethings = "something"; } $c = new a(); echo $c->things->__PARENT__; ?> Are a and b related now?
  9. Take the following example: <?php class a { var $things; public function __construct($stuff) { $this->things = $stuff; } } class b { var $morethings; $this->morethings = "something"; } $c = new a(new b); echo $c->things->__PARENT__; ?> The line "echo $c->things->__PARENT__;" (as you can probably imagine) does not work. How would I output what the 'b' object is stored in ('a')?
  10. $qInsert = "INSERT INTO `photos` (`photo_name`) VALUES ('".$photo."')"; $qInsert = "INSERT INTO photos (photo_name) VALUES ('$photo')"; That probably won't fix it, but the way you wrote it annoyed me lol
  11. Why is your indentation so mismatched?
  12. $mem_tot_gold = 449005; $tot_gold = 157657698; $stake=number_format(($mem_tot_gold/$tot_gold)*100,2); echo $stake; Copy and paste this, there is no reason that it shouldn't work tbh.
  13. Close any script that uses mysql with mysql_close($link);
  14. The code I posted just replaces these functions function set_mob_name($mob_name) { $this->mob_name = $mob_name; } function get_mob_name() { return $this->mob_name; } function set_attack($attack) { $this->attack = $attack; } function get_attack() { return $this->attack; } function set_mob_hp($mob_hp) { $this->mob_hp = $mob_hp; } function get_mob_hp() { return $this->mob_hp; } function set_mob_level($mob_level) { $this->mob_level = $mob_level; } function get_mob_level() { return $this->mob_level; } So, to echo the mob_level you would call: echo $this->get_stat("mob_level");
  15. You clearly have no idea what that code does, expect someone to just read through it and tell you what to do without trying anything yourself. Read a simple php tutorial online and who knows; you may learn something
×
×
  • 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.