How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask The-PC-Guy Your Own Question
The-PC-Guy
The-PC-Guy, Software Engineer
Category: Programming
Satisfied Customers: 1999
Experience:  Extensive Knowledge in PHP, MYSQL, CSS & Javascript
62934938
Type Your Programming Question Here...
The-PC-Guy is online now

I wish to have a table that is linked to my database that

Resolved Question:

I wish to have a table that is linked to my database that allows me to add, delete and edit records. I can get my current PHP page to fetch data from the existing records but when I research tutorials on how to edits them through the page, they all they seem to be different and I am unsure which code with work best with my current php page. If someone would be kind enough to show me the code that is required to carry out what I need and where it needs to be places or correct my current code, I will be very grateful. Current existing code will be provided.
Submitted: 5 months ago.
Category: Programming
Expert:  The-PC-Guy replied 5 months ago.

Thanks for using JustAnswer. My name is***** will do whatever I can to answer your question and will be back in a moment with my reply.

Expert:  The-PC-Guy replied 5 months ago.

can you provide a copy of the code, and an .sql file of your DB.

you can add them to a zip file and addtach here.

are you using WP or some other CMS

Customer: replied 5 months ago.
Here is the database and the php page receiving the data. I should give you a bit of background on the project. It is basically a database of trading cards and the info about them. I'm using notepadd++ myself but i'm not fussed on what is used. Thank you for the quick response. I am very new to SQL and PHP so please excuse me if I have so many questions about it all. Thanks again.
Expert:  The-PC-Guy replied 5 months ago.

i have your files. Please try to explain where you are having problems

Expert:  The-PC-Guy replied 5 months ago.

fist of all why you need to create a table-rows class?

What DB are you working with, I assume its MYSQL

Customer: replied 5 months ago.
it is MYSQL. I don't really have a reason why i'm using table-rows class. I was following a tutorial I saw on w3 and it seem to work for me. I simply want a way to update, edit and delete the records I have in my DB through the PHP page but every tutorial I try to follow are all different and never work for me. I really want something similar to the example i've added below but I might be going into the wrong direction with what I currently have. Like I said i'm not the best with SQL or php i'm afraid
Expert:  The-PC-Guy replied 5 months ago.

so it will be driven by a form then,

yeas, I could create something that would work.

I sent an additional service offer for my time, remember that gets added to the cost of the original question

Customer: replied 5 months ago.
Would it be ok if I except the the offer later this week, on Friday?. It's just that I won't have the funds until then and I hope by then you'll still be here to help me.
Expert:  The-PC-Guy replied 5 months ago.

sure thing, i will be around, just when you are ready, i have a pretty good idea what you want to do now

The-PC-Guy and 3 other Programming Specialists are ready to help you
Customer: replied 5 months ago.
Thank you Andrew. I might be able to get the money sooner but i'll let you know. Thank you for your help so far and I hope everything will be working soon
Customer: replied 5 months ago.
Hello Andrew, I've accepted your offer now. I hope you'll be able to help now
Expert:  The-PC-Guy replied 5 months ago.

just to reiterate,

1. we list all fields in the DB

2. for each entry list a edit link which goes to an edit form

3. delete link which deletes it.

am i missing anything

Customer: replied 5 months ago.
Basically I want to have all the information on the form pulled from the database and have the option to Add, delete and update from the form at the same time updating the database as well. Kinda like the example I sent before. Is that ok?
Expert:  The-PC-Guy replied 5 months ago.

well i highly doubt you will be able to do all of those options from a single form as they are different operations. So will require different forms.

but will see what can be done, may be possible to have add or update buttons depending on what option is selected.

Customer: replied 5 months ago.
Well again I wish to have something similar to this but do the best you can. The Add and update would be still great to have. Thanks for getting back to me.
Expert:  The-PC-Guy replied 5 months ago.

ok then this is done,

i modified the cards table so that the ID would auto increment, and modified php code to do so.

I added modified sql file to zip file

Customer: replied 5 months ago.
Sorry for only getting back to you now, been a busy week. Thank you very much but one more question. How do I access the database and open it up on the PHPAdmin? Sorry for asking but again not the best with databases
Expert:  The-PC-Guy replied 5 months ago.

https://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_administration.htm

i think you want to look at the import section

Customer: replied 5 months ago.
Thanks but I still appear to be having issues importing. Sorry for still bothering you but i will make sure I will give a great review and tip after this is all done. I just want to make sure i'm using your work right. (Also this is what i'm seeing in my DB)
Expert:  The-PC-Guy replied 5 months ago.

i wouldn't wporry about it, looks like you already had values programmed in. The only thing you need to make sure is that the ID field is set to auto increment

Customer: replied 5 months ago.
All working great now, Thank you! Andrew I can't thank you enough. I'll make sure to give you an excellent review and will always come back to you if I need help.