Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6342573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:15:56+00:00 2026-05-24T20:15:56+00:00

OK Dreamweaver and my local host server keeping saying that their is a error

  • 0

OK Dreamweaver and my local host server keeping saying that their is a error but i have no idea where please help?

This is a php script to figure out if the user already has a account and then if he doesn’t it registers him into the database

<html>
<head>
<style type="text/css">
p {color:white;font-size:20px;}
.toppa {width: 100%;background-color:#2D2D2D;}
</style>

<?php
//Database Information

$dbhost = "localhost";
$dbname = "a8423624_grubber";
$dbuser = "root";
$dbpass = "";

//Connect to database

mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());

$username = $_POST['username'];  
$email = $_POST['email'];    
$password = md5($_POST['password']);
$repassword = md5($_POST['repassword']);

$month = $_POST['month'];  
$day = $_POST['day'];
$year = $_POST['year'];  

$Intro = 1;
$admin = "no";

if (!(empty($username) or empty($email) or empty($password) or empty($repassword))) 
{
//a Text field is empty
    if ($password == $repassword) {
     $checkuser = mysql_query("SELECT username FROM users WHERE username='$username'");  
     $checkuser1 = mysql_query("SELECT email FROM users WHERE email='$email'"); 
     $email_exist = mysql_num_rows($checkuser1);
     $username_exist = mysql_num_rows($checkuser);
              // checks email 
            if ($username_exist  > 0)
                      {
                      echo "<div class='toppa' align='center'>
                      <h1 align='Left'> Grubber </h1>
                      </div>
                      <p> You'r Name has been taken please try another Name. </P>";
                      include 'tryagain.html';
                      }
                     else
                      { 
                             if ($email_exist > 0)
                             {
                              echo "<div class='toppa' align='center'>
                              <h1 align='Left'> Grubber </h1>
                              </div>
                              <p> You'r Email has been taken please try another Email.</P>";
                              include 'tryagain.html';
                             }
                             else
                             {
                                $themes = ("http://grubber.host56.com/Themes/Grubber.gif");
                                $date = ("$year/$month/$day");
                                $proimg = ("http://grubber.host56.com/images/defaultprof.png");
                                $query = "INSERT INTO users (admin,themes,proimg,Birthday,Intro,email, username, password)
                                VALUES('$admin','$themes','$proimg','$date', '$Intro', '$email', '$username', '$password')";
                                mysql_query($query) or die(mysql_error());
                                mysql_close();
                                echo "<div class='toppa' align='center'>
                                <h1 align='Left'> Grubber </h1>
                                </div>
                                <p> Please sign in to test that your account works </P>";
                                include 'tryagain.html';
                                }

             else
            {
            echo "<div class='toppa' align='center'>
            <h1 align='Left'> Grubber </h1>
            </div>
            <p>You'r passwords are not the same please try again.</P>";
            }

}
else
{
     echo "<div class='toppa' align='center'>
                      <h1 align='Left'> Grubber </h1>
                      </div>
                      <p> Please fill in all fields </P>";
                      include 'tryagain.html';
}
    }
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:15:57+00:00Added an answer on May 24, 2026 at 8:15 pm

    First, you should enable error_reporting.
    Secondly, you should sanitize your input using mysql_real_escape_string (else harmful people could SQL inject) and thirdly you should use or die (mysql_error()); after your SQL queries, like this:

    $checkuser = mysql_query("SELECT username FROM users WHERE username='$username'") or die(mysql_error());  
    $checkuser1 = mysql_query("SELECT email FROM users WHERE email='$email'") or die(mysql_error());
    

    If your SQL query fails, you will see the proper error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be an unusual request but - Dreamweaver likes to create a local
I'm using Dreamweaver to publish my website to the web server. I have a
I have Dreamweaver CS 5.5 version 11.0 Built 4909. But it's not the latest
Jquery wont load. I'm a noob, but have persisted, trawled this site & tried
I get that error from chrome (all the other browsers appear blank), the problem
I use Dreamweaver heavily for modifying Liferay templates (Velocity files), and then have to
First, I understand that an image cannot be copied from a local machine into
In Dreamweaver I have a list box or menu/list. I am dynamically adding data
Currently evaluating Dreamweaver CS 5.5. I like much of it - but wondering about
I'm using Dreamweaver, but it doesn't give me classes, functions, subs names when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.