Jnerocorp Posted September 27, 2009 Share Posted September 27, 2009 Hello, How do u make pages that use links like this. "/[email protected]" I am working on a payment processing where after the person pays it returns to that link with their email i already know how to get it to the page I just dont know how to set up the page that takes the email from the url and then proccesses it to run the script that i write it do Thanks, JOhn Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/ Share on other sites More sharing options...
mrMarcus Posted September 27, 2009 Share Posted September 27, 2009 on a page with '[email protected]' in the URL, adding the following to the page will give you the value of 'email' (which in this case would be: [email protected]): echo $_GET['email']; continue with other variable, ie., [email protected]&name=john echo $_GET['name']; //would produce: john it's using the $_GET superglobal; of course, using this method creates large security gaps, but perhaps you should just get used to working this method, then focus on security. for an example, having echo $_GET['email']; will echo whatever the value is for 'email' .. so, you can maybe see how that could used in a malicious manner. user switches out his email address for some malicious code, and it is then displayed right there on your page. so, also look into sanitizing and xss attacks. Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/#findComment-925874 Share on other sites More sharing options...
Jnerocorp Posted September 27, 2009 Author Share Posted September 27, 2009 Also Do you know how to make it so after information is put into a database it is set to delete itself from the database after 10 minutes? Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/#findComment-925898 Share on other sites More sharing options...
bothwell Posted September 27, 2009 Share Posted September 27, 2009 Also Do you know how to make it so after information is put into a database it is set to delete itself from the database after 10 minutes? If it's a *nix server, then create a php file that runs the delete query you need, and then set up a cron job on the server to ping that file every 10 minutes. Your hosting package will have the details for creating cron jobs in its FAQ somewhere, probably. Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/#findComment-925903 Share on other sites More sharing options...
halwaraj Posted September 27, 2009 Share Posted September 27, 2009 Also Do you know how to make it so after information is put into a database it is set to delete itself from the database after 10 minutes? If it's a *nix server, then create a php file that runs the delete query you need, and then set up a cron job on the server to ping that file every 10 minutes. Your hosting package will have the details for creating cron jobs in its FAQ somewhere, probably. You can write a trigger in the DB. Refer to the DB documentation. Thats the best way. The DB itself takes care of itself. Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/#findComment-925958 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 I don't think trigger is as good as cron job bro? Link to comment https://forums.phpfreaks.com/topic/175700-solved-making-a-link-like-this-orderconfirmationphpemailxxxxxxxxxcom/#findComment-925968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.