I'm trying to create a page that can allow users to customize there own specific pages, these pages will only have a few customization options such as text, color and layout of blocks. I haven't started a configuration page but i have began creating a template that the user will modify to suit their needs.
I would like to somehow get the information given by the user on the configuration page and then display it into parts of the other page. At the moment i don't know the best way to get that information and display in tags on the other page such as these tags.
<p><i class="fa fa-certificate fa-fw w3-margin-right w3-large" style="color: #582d37"></i>
<?php $GLOBALS['event1'] ?>
</p>
<p><i class="fa fa-globe fa-fw w3-margin-right w3-large " style="color: #582d37"></i>
<script>
document.write(venue1)
</script>
</p>
<p><i class="fa fa-calendar fa-fw w3-margin-right w3-large" style="color: #582d37"></i>
<script>
document.write(date1)
</script>
</p><br>
This is a snippet of code of a few ways I've tried to display the information sadly i haven't had any luck in getting the information and displaying it at the same time.
I was thinking about trying to get information from the PHP configuration form and then turn it into a java script variable and display it into the page.
I would like your views on how to do this and whether there is a better way and how to do that.
</div>
Zahir,
assuming you have this information already stored and have written the code that fetches the user information from the database:
You will need to echo out the values like so:
<p><i class="fa fa-certificate fa-fw w3-margin-right w3-large" style="color: #582d37"></i><?php echo $cert; ?></p>
On the page where user fills out the form, have the form go to some page (could be the same page)--this page is specified in form tag's ACTION attribute.
All form data will be in $_POST; prior to making the call to the database for storing the form data, you must sanitize/validate it! (otherwise, your application will be vulnerable to attacks such as SQL Injection.
And then follow the step above.
Just some pointers to get you going... if you get more stuck write back.
Hope this helps,
-Rush