earth2ocean Posted October 23, 2008 Share Posted October 23, 2008 With the exception of infusing a php fusion mod and using includes to make it easier to update my old website, I have very little knowledge of php or mysql so please bear with me. I'm trying to make my life easier (and my staff's) by putting some information online. But I've struck a snag. I'm building a site to store all our customer info, their hired equipment info, our events, classes and participants info... and so on. I have made a page that I want to do several things at once, or in turn if they have to. So far, I've retrieved a customer record from the database using his ID (which is a primary key). The primary key I will write to the ITEMS table to identify which customer has which item(s). I also have 2 date selectors - for the date the item was hired out and its expected date of return. Those dates will be written to the ITEMS table also. That way I can track anything overdue. Then because I have about 300 items which I hire out to customers and I don't want the page to scroll forever, I've created a tabbed interface *thingy* (just div's on the page that appears as tabs) which retrieves 'types' of items (let's say apples on one tab, oranges on another for example) using the item_ID, description, and it's availability. Next to each item I've put a link that says "+Add". There's my snag: if I click the +Add link next to an item, I want to add the customers ID and the 2 dates to the items table and change the item availability from 0 to 1, but I want to return to the page with the tabs afterwards so that I can add another item if necessary. The items table is the only table that will be affected by all of this. My first question is: Can all of this clicking and adding be done in the background so it doesn't appear to be doing anything? In theory, since the include for the 'oranges' tab (div) is asking only for available 'oranges', if I returned to the 'oranges' tab afterwards, that particular 'orange' would no longer be there, right? My second question is: And with all due respect to clever tech-y people, this is bugging me, but I'd really like to try and work it out if I can... what is/are the commands (commands??) I'm looking for, and where can I go to read up on them and learn to make this work? Much appreciation for any hints you can give me to figure this out - it's a hurdle that I can get over, but I need a stepping stone to climb that high right now! (And sorry for the long post too ) Link to comment https://forums.phpfreaks.com/topic/129771-not-sure-where-to-start/ Share on other sites More sharing options...
Alt_F4 Posted October 24, 2008 Share Posted October 24, 2008 My suggestion would be to have a look at AJAX - that will allow you to alter the db behind the scenes. If you also want the selected 'orange' to not be displayed then you will either need to come up with some crafty javascript to hide it or refresh the page If you need some code examples let me know as i have a few on hand Link to comment https://forums.phpfreaks.com/topic/129771-not-sure-where-to-start/#findComment-673440 Share on other sites More sharing options...
earth2ocean Posted October 29, 2008 Author Share Posted October 29, 2008 My suggestion would be to have a look at AJAX - that will allow you to alter the db behind the scenes. If you also want the selected 'orange' to not be displayed then you will either need to come up with some crafty javascript to hide it or refresh the page If you need some code examples let me know as i have a few on hand Thanks for that. I've been doing some reading since I was here last, and I got to a point where I thought I'd been able to put the data in a url and play with it again on another page, but it all seemed like there was far too much going on, and it never returned back to the page again anyway. It always took the dates out that had been entered. Is AJAX difficult? I've not looked into it - I'm only just getting my head around php! And will I need to alter any of the existing code to work with it? (Not that my code won't need altering anyway, it's pretty messy but I figured I'd clean it up once I had a working system going on!) Link to comment https://forums.phpfreaks.com/topic/129771-not-sure-where-to-start/#findComment-677794 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.