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

  • SEARCH
  • Home
  • 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 1108855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:08:47+00:00 2026-05-17T02:08:47+00:00

I have another script that I can’t figure out what is wrong with it.

  • 0

I have another script that I can’t figure out what is wrong with it. I attempted to use the

error_reporting(E_ALL);

to report the errors, but it doesn’t report anything. Anyway, here is the code I’m having trouble with.

<?php
error_reporting(E_ALL);
$username = $_POST['user'];
$email = $_POST['email'];
$password = md5($_POST['pass']);
$currname = $_COOKIE['ZBrownTechnologyCorporationBeta'];

$con = mysql_connect("HOST", "USER", "PASS");
if (!$con) {
  die('Unable to connect: '.mysql_error());
}

mysql_select_database("zach_blogin", $con);

if(empty($password)) {
  $nothing = "nothing";
} else {
  mysql_query("UPDATE members SET password = '$password' WHERE username = '$currname'");
}


mysql_query("UPDATE members SET Email = '$email' WHERE username = '$currname'");

if($username==$currname) {
  $nothing = "nothing";
} else {
  $query = ("SELECT username from members WHERE username = '$username'");
  $result = mysql_query($query);
  if (!$result) {
    header("Location: " . $_SERVER['HTTP_HOST'] . "/public_html/Beta/account.php?invalid");
    exit;
  }
}
mysql_query("UPDATE members SET username = '$username' WHERE username = '$currname'");
header("Location: ". $_SERVER['HTTP_HOST'] . "/public_html/Beta/main_login.php?update");
?>

I have looked over this code for a while now. Can’t seem to get the error reporting to work, so here I am again. Thanks to everyone who has helped, and who will help!


By Request of @Klinky:

When attempting to use this page (named myinfo.php ) in Opera, it displays the default message indicating that it is not able to find the page and/or the server. In Internet Explorer 8, it displays a 500 Internal Server Error.

Here are the server specs:
OS: Linux
HTTP: Apache v2.0.63
PHP: 5.3.3
MySQL: 5.0.91-community


I looked in the logs, and this is the error message:

[Sat Sep 25 21:34:08 2010] [error] [client 68.52.52.190] PHP Fatal error:  Call to undefined function mysql_select_database() in /home/zach/public_html/Beta/myinfo.php on line 12, referer: http://zbrowntechnology.com/Beta/account.php

The only thing is, the database I tried to select does exist!

  • 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-17T02:08:47+00:00Added an answer on May 17, 2026 at 2:08 am

    There is no builtin function name mysql_select_database. I guess you meant mysql_select_db

    Change

    mysql_select_database("zach_blogin", $con);
    

    to

    mysql_select_db("zach_blogin", $con);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to figure this one out. I have a validator-type script that
I have a Perl script that takes user input and creates another script that
I have a PHP script that I'm invoking from another shell script that sends
I have a php script that grabs links from another website. I am storing
I have a bash script that sources contents from another file. The contents of
I have a custom accordion script that I'm trying to adapt for another site.
Let's assume I have a main script, main.py, that imports another python file with
I personally know limited PHP, however I have a script provided by another, that
I have one script that loads very quickly, but I have another script that
I have a PHP script that deletes files. It can delete files from my

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.