126 Posted Topics
Re: I got bored... <?php error_reporting(0); define("host","localhost"); define("user","root"); define("password",""); define("db","pass2"); try { $db = new PDO("mysql:host=" . host . ";dbname=" . db, user, password); }catch (Exeption $e){ die("ERROR! Could not connect to MySQL database."); } $username = strtolower(addslashes($_POST['username'])); $password = strtolower(addslashes($_POST['password'])); $sql = "SELECT * FROM users WHERE username=:user AND password=:pass"; … | |
| |
Re: Make a file called validate.php — make an ajax request to that, set the cookie, done. | |
Re: Why do people still use mysql_*? Also, why on Earth are you creating a new **table** per submission? So glad I'm not your sysadmin. | |
Re: To add more items you could simply do `$myArray[] = array();` | |
Re: You work in classes, it's a method, not a function. Hehe | |
Re: Your SMTP login information is incorrect judging by the error alone. Check your username and password is right. | |
A while ago, I had an account on DaniWeb.com, and I requested it be deleted. On that account, I had donated about $3-$4. I had also gained the OP Sponsor rank. Is it possible that I could get it back? I am able to prove the payments as they were … | |
Re: You'll want to change this: $customers = $_POST ['customers']; $bill = $_POST ['bill']; $tax = $_POST ['tax']; ...to this: $customers = $_POST['customers']; $bill = $_POST['bill']; $tax = $_POST['tax']; ...it's better in terms of syntax. | |
I'll put it simple, I suck at Javascript. How would I make a code editor, using a textarea that you can press [tab] and then it does this: " ". And when you press enter, the indent stays. | |
Re: I have not yet got an answer, as I have not read much of your code. I have though, noticed you are using mysql_* functions, which are as of this point... deprecated. Have you checked out [PDO](http://www.php.net/pdo)? It's much more secure and I might be wrong here... but I also … | |
Re: .circle { border-radius: 100%; width: 100px; height: 100px; background: #FF0000; } Give that a shot! *Not tested.* | |
Re: $sql = 'SELECT * FROM users WHERE username="' . $username . '" LIMIT 1'); | |
Re: You! If you learn HTML, CSS, Javascript, and PHP... you can do it how you like it, and free!! | |
Re: sudo apt-get purge php*; sudo apt-get remove php*; sudo apt-get autoremove; sudo apt-get install php5; | |
Re: The only *reliable* way, is to use cookies! Why not use cookies? I like cookies. | |
Re: When doing what JorgeM said, be sure you alter it quite a bit! The styles are *copyrighted*! | |
Re: Give it a shot by using [PDO](http://www.php.net/pdo). I think this will work. | |
So, I decided to come back. Do you remember me? I used to own something called PingrGlobe. | |
| |
Re: Why not try this out? <?php $denied_hostnames = array("gmail.com", "yahoo.com"); foreach ($denied_hostnames as $hn) { if (strstr($_POST['email'], "@" . $hn)) { $errors[] = "Sorry bud! We don't accept " . $hn . " email addresses"; } } You could also do: <?php $allowed_hostnames = array("mydomain.com", "mydomain.net"); $good_hostname = false; foreach … | |
Re: Extending pritaeas' answer... you could use this: <?php // This goes at the TOP of your file(s). ini_set("display_errors", false); error_reporting(0); | |
Re: I would recommend doing this: <html> <head> <title>My Title</title> <style> body { /* your body styles here */ } .wrapper { /* your wrapper styles here */ width: 100%; height: 100%; } .mydiv { width: 800px; height: 20px; } .pad { /* Add your padding here! */ padding: 5px; } … | |
![]() | Re: Get on a new server, with PHP5.X. Using outdated versions is **not** recommended. |
The End.