pjheliking Posted July 21, 2008 Share Posted July 21, 2008 Silly question but gonna pop it off anyway. I am kinda new to php and i am working on using url parameters... What i want to happen is for example url returns http://www.yourdomain.com/index.php?error=username what i want to happen is the error=username activates text to appear for instance above the username box saying something like "Sorry the requested username is already in use" Is it possible or is there other ways of doing this any help greatly appreciated thanks in advance Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/ Share on other sites More sharing options...
DarkWater Posted July 21, 2008 Share Posted July 21, 2008 I wouldn't do it like that. I'd personally handle the form on the same page as the form itself so you can directly output the errors. Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/#findComment-595965 Share on other sites More sharing options...
pjheliking Posted July 21, 2008 Author Share Posted July 21, 2008 im not all that up to speed with doings something like that. Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/#findComment-595969 Share on other sites More sharing options...
pjheliking Posted July 21, 2008 Author Share Posted July 21, 2008 <?php if ($error="username") { echo ("<b>Sorry but that email address is already in use. Please input another again</b>"); } ?> would that work? Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/#findComment-595986 Share on other sites More sharing options...
pjheliking Posted July 21, 2008 Author Share Posted July 21, 2008 found it <?php $var = $_GET['username']; if (isset($var)) { echo "Sorry but the username you have supplied is already in use. Please try another"; } ?> Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/#findComment-596004 Share on other sites More sharing options...
rameshfaj Posted July 22, 2008 Share Posted July 22, 2008 this is simple problem and GET will work but for other confidential data either use POST method or use some encryption or process the data within the same page as told by others. Link to comment https://forums.phpfreaks.com/topic/115917-url-parameter-help/#findComment-596200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.