Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

crobak1

Members
  • Joined

  • Last visited

  1.    crobak1 reacted to a post in a topic: Error connecting to database
  2.    crobak1 reacted to a post in a topic: Error connecting to database
  3.    crobak1 reacted to a post in a topic: Error connecting to database
  4. NO need now I've found the mistake -.- been through the code few times and didn't realise that: ''".$username."', 2 upside down commas -.- (stupid dreamweaver always places ' ', and I always forget ) Thank you both anyway (: it's adding it to the database now
  5. sorry my bad. the form shows up however when I try to register this: Fatal error: Call to undefined function shal() in C:\xampp\htdocs\register.php on line 7 and line 7 is: $password = mysql_escape_string(shal($_POST['password'])); got rid of the shal() and it works perfectly (: THANKS (: --edit/again/ -.- Well I do get the message however PHPmyAdmin doesn't show any users. I'll create a log in form now and see if the login work even though it doesn't show up if not.. :/
  6. :/ it's not the passwords problem. I did what you suggested but still get the same results. Besides when I used the non-localhost the pass was required and Im sure it is correct so sadly that's not is :/ But thanks anyway (: //this is what you mean right?// <?php $host = 'localhost'; // mysql server domain $user = 'root'; // mysql username $pass = ''; // mysql password $db = 'tutorial'; // mysql database name $connect = @mysql_connect ($host,$user,$pass) or die('Error connecting to database!'); $select = @mysql_select_db($db,$connect) or die('Error selecting database!'); ?>
  7. Hello Im using a local, MyPhpAdmin. And whenever I try loading the 'register' page I keep getting this: 'Error connecting to database!' My Code: //mysql.php// <?php $host = 'localhost'; // mysql server domain $user = 'root'; // mysql username $pass = 'root'; // mysql password $db = 'tutorial'; // mysql database name $connect = @mysql_connect ($host,$user,$pass) or die('Error connecting to database!'); $select = @mysql_select_db($db,$connect) or die('Error selecting database!'); ?> //register.php// <?php include ('mysql.php'); if (isset ($_POST["submit"])) { $username = mysql_escape_string($_POST['username']); $password = mysql_escape_string(shal($_POST['password'])); if (!empty ($username) && ($password)) { $sql = mysql_query ("INSERT INTO users ( user_id,username,user_password,user_regdate) VALUES ( '0',''".$username."','".$password."','".time()."') "); echo 'You are now registered!'; } else { echo 'You must enter a username and a password!'; } } else { echo '<form action="register.php" method="post"> Username: <input type="text" name="username" /><br /> Password: <input type="password" name="password" /><br /> <input type="submit" name="submit" value="Register" /> </form>'; } ?> I've tried using a database created on 000-webhost <?php $host = 'mysql2.######.com'; // mysql server domain $user = '***'; // mysql username $pass = '***'; // mysql password $db = 'a8124620_login'; // mysql database name $connect = @mysql_connect ($host,$user,$pass) or die('Error connecting to database!'); $select = @mysql_select_db($db,$connect) or die('Error selecting database!'); ?> (sorry with the 000-webhost the forum automatically '#' part of the host. But I am certain that it is correct) Thanks (:
  8. Hi all Im a newbie at web design etc. Although I have some knowledge of: html/css/c++ I am great (according to other people) at graphic design and I always had a great interest in making websites and I did create a few but nothing too advanced so hopefully I can learn a lot on this forum and be better at it

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.