Buying Need an Ajax/PHP template coded ASAP

Discussion in 'Programming' started by nt99, Jun 30, 2010.

  1. #1
    Warning: major noob alert here....so some of this might not make a ton of sense.

    Okay, I will try to explain this the best I can. Basically, I'm really new to Ajax, and there is a certain functionality I need to use in hundreds of places across my site. I can do it all myself; I just need one example of it coded and explained to me, then I can duplicate it myself on the rest of the site.

    Basically, it's like this:

    There are a ton of pages on my site that include a header file (which includes the database connect file, session start, and a globals file with functions and stored variables....and also a footer. So then I have all of these pages where I need to use Ajax functionality in between those includes. As an example, I'll use animal.php.

    animal.php has a form with one field and a submit button. I can enter a animal name like "Zebra" and hit submit. When I hit submit, it uses Post, and let's say it enters "Zebra" into the database for that user. Obviously this is easy to do with PHP as you can just use an isset($_POST) code to run the necessary queries on the same page. Well, I want to do that type of thing but with using Ajax so that it does not reload the page and it just runs the queries and spits out whatever the script echo's.

    Okay, so now that you see what I'm doing, here's what I need:

    - someone to set me up a clear, simple example of how this would work. Can all of it be on animal.php? Or do I need a second PHP page? I would prefer if it could all be on one page because then the included header file can keep all of the necessary variables instead of posting to a new PHP page where i have to include certain files again.

    - After submitting the animal, the field will need to automatically clear (without the page reloading of course)

    - And last, this is the trickiest part of the whole thing. There is a section in the LEFT NAVIGATION that needs to automatically update every time I would submit a new animal into the database. So for example, let's say the left navigation (from header.php) has "current animal: zebra" ........then I go to animal.php and submit a new animal like an elephant. It runs the necessary script, inserts "elephant" in place of zebra, shows me the normal echo'd results....but then it also updates my left navigation to say "current animal: elephant"

    I hope this makes sense. I've ready about 50 tutorials and I'm learning a lot more, but I'm getting very impatient, so I feel like if someone coded me an example that exactly fit my requirements, I would be able to study it and use it across the rest of the site.

    Please PM me and let me know your rate to 1) code this and 2) give me a little bit of explanation/consulting in case I have questions about it.

    Thanks!
    Scott
     
    nt99, Jun 30, 2010 IP