I have a page which I want to be able to generate a random ID for when the users click save. It will then give them a profile ID in the url (example: myurl.php?profile=12345) so that they can bookmark/return without having to remember their ID or having to perform a "login" task. Now, what I want to be able to do is extract that 12345 and have it populate the page based on their saved values in the MySQL database. I've got all of that work done. However, I think my approach to extracting the GET may be incorrect.
I have my main page in which I call out to another php in order to populate the user values section of the page. I currently have it set up as a require() page, but it's complaining about 'No such file or directory'. Below is the require() on the main page:
Code: Select all
<h2>[ User Values ]</h2>
<? require("$_SERVER[DOCUMENT_ROOT]/user_fields.php?profile=$_GET[profile]"); ?>Code: Select all
<?
$attack_table .= $_GET['profile'];
?>
<?= $attack_table; ?>