Hello All,
I just joined the site today, looking for some guidance here as I am a newbie. My experience is limited as I started learning PHP about 2 months ago, so I apologize if this question is considered "dumb".
I am making a webpage, and I want to be able to click on the links and have them display in a specific area of the site without having to refresh the page.
Thoughts?
Massimo
Generating HTML with PHP without refreshing
Moderator: General Moderators
-
massimorai
- Forum Newbie
- Posts: 13
- Joined: Mon Feb 06, 2012 8:01 am
Re: Generating HTML with PHP without refreshing
PHP runs server-side, so trying to do anything in PHP without a page refresh isn't going to work. Sounds like you'll probably want an AJAX solution. Could you expand a little on what you're trying to do?
-
massimorai
- Forum Newbie
- Posts: 13
- Joined: Mon Feb 06, 2012 8:01 am
Re: Generating HTML with PHP without refreshing
Celauran, thank you so much for the response.
I would like to create a dynamic form. One that changes depending on which options are selected. I am creating an "intake form" that captures specific project related information however the form itself needs to be dynamic...
I would like to create a dynamic form. One that changes depending on which options are selected. I am creating an "intake form" that captures specific project related information however the form itself needs to be dynamic...
Re: Generating HTML with PHP without refreshing
The same principle applies. Have listeners for onchange/onkeyup (or whatever applies) on your form fields, and send an AJAX request to get the appropriate values for the dependent fields.
-
massimorai
- Forum Newbie
- Posts: 13
- Joined: Mon Feb 06, 2012 8:01 am
Re: Generating HTML with PHP without refreshing
And once the form is "submitted" the contents can be retrieved through the GET and POST methods correct?
-
massimorai
- Forum Newbie
- Posts: 13
- Joined: Mon Feb 06, 2012 8:01 am