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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:07:28+00:00 2026-06-17T12:07:28+00:00

I am working on a project which allows me to create a customer database.

  • 0

I am working on a project which allows me to create a customer database. I have made an Create.php and Delete.php but am having issues with the basic structure for an Edit page.

My initial idea is to create a populated drop down box (Which I can do) which on click will take the user to domain.com/Customer.php?Customer_name=”JohnD”

I am having a few issues with regards to this as it is doing 2 things.

  1. It is printing out ALL of the data in my table into the echo.
  2. It isn’t taking the values from the URL, However I know that I have missed something but am unsure of what I need to search for.

Here is my snippet so far:

               <h2>
                <?Php
                $sql="SELECT id,customer_name FROM Customers";
                $result =mysql_query($sql);
                while ($data=mysql_fetch_assoc($result)){
                ?>
                <?Php echo $data['customer_name']; } ?>
                </h2>

As of yet I am getting this in the header:

John Doe Jimmy Timmy Test

These are all the values inside my rows for the table Customers.

Sorry if the question seems all over the place. I will correct if it is not easy to understand.

Thanks in advance

  • 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-06-17T12:07:29+00:00Added an answer on June 17, 2026 at 12:07 pm

    use this url

    domain.com/Customer.php?CID=1
    

    and the code should look like

    <?php
    
                $customer_id = (int) $_GET['CID'];
    
                $query = "SELECT id, customer_name FROM Customers 
                               WHERE id = {$customer_id}";
    
                $result = mysql_query($query) or die('<p>' . $query . '</p><div>' . 
                                       mysql_error() . '</div>');
    
                $customer = mysql_fetch_assoc($result);  
    
    ?>
     <h2><?php echo $customer['customer_name'] ?></h2>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started working on a project which uses Net_URL_Mapper from PEAR (php) as the
I'm working on a project which allows the advanced user to define their own
I am working on a project on WPF and I have to create some
I working on a project in which I have to simulate a memory manager
Can anyone help me find an up-to-date, working ATL project which has a main
Iam working on a project which involves writing a Mork File (Mork is a
I'm working on a project which contains several slave nodes and one master node.
I'm working on a project which involves two processes, let them be A and
I'm working on a project which needs to use youtube api. The html and
I am working on a project which lists file sharing urls from the likes

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.