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 4244036
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:39:21+00:00 2026-05-21T03:39:21+00:00

Hey, a beginner’s question here…. In order to learn PHP and SQl I have

  • 0

Hey, a beginner’s question here….
In order to learn PHP and SQl I have set up a Localhost Server on my computer running Apache and phpmyadmin, using MAMP.

In the course of testing, I have found that through the backend phpmyadmin interface I can modify the db as I please without any trouble. However, when I try to query the db through php scripts, no changes seem to be committed.

I say this because it seems that I am able to open a connection to phpmyadmin, evident by the error messages I receive when trying to pass a malformed query.

When I run these scripts, and then check the backend, I see no changes even though I received no errors.

My best guess would be php is incorrect. So here is what I am using.

<?php
$connect = mysql_connect("localhost", "roo", "root");
if(!$connect){
    die('COULD NOT CONNECT! HURS WHY : ' . mysql_error());
    }
echo "Connection Success";

mysql_select_db("Geodb", $connect);

mysql_query("INSERT INTO countries (country_code, country_name)
VALUES ('uk', 'United Kingdom')");

mysql_close($connect);
?>

I suspect that this has been a problem because i am a beginner, but I have tried solving it and searched for an answer… So I hope you won’t mind helping me out haha.

Thanks

  • 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-21T03:39:22+00:00Added an answer on May 21, 2026 at 3:39 am

    Chances are that an error is being thrown, but not displayed due to your display_errors php.ini setting. As such, I’d recommend checking your error logs.

    Additionally, as this isn’t a production environment (and hence it’s OK to show errors) you’ll probably want to change your display_errors setting to on (display_errors = On) and your error_reporting level to…

    error_reporting = E_ALL & ~E_NOTICE
    

    or, better still…

    error_reporting = E_ALL
    

    …within your php.ini file.

    By doing this, you’ll be informed of all the errors, warnings and notices that are occurring.

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

Sidebar

Related Questions

Hey bit of a beginners question here, I have connected to an imap server
hey guys, beginner here. I have written a program that outputs files to .txt's
hey guys how to make these php html links codes possible. i have tried
Hey everyone I have a basic search function here that allows me to search
Hey guys here is my php: $x = array(one, two, three); foreach ($x as
Hey all here are my tables i have placed in a DIV for each.
Hey, I'm a beginner in Objective C, and my .NET and Java years have
This is probably an easy question, but hey, i'm a beginner. So I've created
hey all, I have made a socket server in C# for a flash game
Hey there. Java beginner here :) Well, I'm having a few troubles with this

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.