Jump to content

Recommended Posts

I am trying to get data from mysql database which is already created. I am trying to get the person to input the information and then have have the PHP code go out and get the correct data back from the database and display it on the screen in a table. 

 

This is my connection string to my database.

 

$con=mysqli_connect ("localhost", "root", "", "abc") ;
$result = mysqli_query($con,"SELECT * FROM Customer");
 
 
This is what I have for my form so far.
 
<form id="Form1" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        Customer First Name: <input name="Username" type="text"><br>
        Customer Last Name: <input name="LastName" type="text"><br>
OR<br>
        Device Name: <input name="DevName" type="text"><br>
        <input type="submit" value="Submit">
 
What is the total number of devices that were checked out during a certain timeframe? This is the information that I am trying to pull from my database.
 
I know this isn't much but I am a complete noob at PHP and need help!
 
Thank you very much! :)
Edited by ITNerd1001

 

What is the total number of devices that were checked out during a certain timeframe? This is the information that I am trying to pull from my database.

Do you want the total number checked out by everyone? by a particular user? Where is number of checkouts stored in your database? We need column names. During what timeframe? What database columns have dates?

So - you've written all of two lines of PHP code and now you want us to write the rest?  Perhaps you should begin by learning how to write php.  Go thru a tutorial or two online and learn instead of starting off by asking others to do your work.  Everybody - EVERYBODY - is a complete "noob" at one time.  The way to lose that nametag is by learning and it involves some - gasp! - work.

Im not asking you to write my code for me I simply asked for help. This is 1 of 14 queries and I asked for help on just this one. Stop acting like you are the best and stay out of this if you aren't willing to help. I have been going through PHP for like 2 weeks and it is for a school project that is due in 1 week. Just looking for quick help. 

 

David- Thanks for acting civil and be willing to help. It is hard to read and understand programming and feel having someone help with something I am working on could help me learn easier. I am looking for just the total that are checked out, not by a single person. I want to make it so they can enter in a date range and get the number of devices check out during that data range. I have a table named device that is linked to term agreement which hast he due dates in it. 

Im not asking you to write my code for me I simply asked for help. This is 1 of 14 queries and I asked for help on just this one. Stop acting like you are the best and stay out of this if you aren't willing to help. I have been going through PHP for like 2 weeks and it is for a school project that is due in 1 week. Just looking for quick help. 

 

David- Thanks for acting civil and be willing to help. It is hard to read and understand programming and feel having someone help with something I am working on could help me learn easier. I am looking for just the total that are checked out, not by a single person. I want to make it so they can enter in a date range and get the number of devices check out during that data range. I have a table named device that is linked to term agreement which hast he due dates in it. 

THIS is a much more informative post than your first.  Do you see how much differently you present yourself this time?  Your first post (2nd on this site?) showed you in a much more "needy" light.  You presented (as I said) two lines of code and some html and asked for help in writing a query that you apparently had not even attempted.  Typical newbie post asking forum members to write the code that the poster is too lazy to even attempt.

 

So - do you have something to show now that you have been provided some input from others?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.