Help In Php Programing - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Help In Php Programing (926 Views)
| Help In Php Programing by nimboya(op): 10:40pm On Nov 12, 2010 |
| Re: Help In Php Programing by binkabir(m): 7:40pm On Nov 13, 2010 |
what do u really want to do? redirecting an authenticated user to another site that need assess control or just redirect to a different url? if the latter is the question u can simple use the php built in function "header" to redirect eg <?PHP header('location:user.php'); ?> u can also put it in conditional statment so that u can redirect to different pages based on the conditions |
| Re: Help In Php Programing by nimboya(op): 10:17pm On Nov 20, 2010 |
What i actually mean is that just like when you type in facebook someones special page like www.facebook.com/ewere it will open the user's page |
| Re: Help In Php Programing by gameaddict(m): 10:36pm On Nov 20, 2010 |
google url rewrite. |
| Re: Help In Php Programing by mikkytrio(m): 1:36pm On Nov 26, 2010 |
on the page where you want the extra value to be fixed eg http://www.yourwebsite.com/username and username is the value to be inserted then on the http://www.yourwebsite.com/index.php or the profile.php page place this codes $url = empty( $_SERVER['REQUEST_URI']) ? index.php:$_SERVER['REQUEST_URI']; //this gets the address from the address bar eg /index.php or username $url = stripslashes($url); //strips off the /username to username //then u palce a conditional statement to collect the /username and lead the user to the expected page //first of all access ur database to get all usernames /*, codes for connecting to database and table where username is located goes here to get username i prefer using $sql = mysql_query("select from ".$tableName." where columnName=".$url); assuming there is a column called username and userpage eg username.php $userUsed = mysql_fetch_row($sql); $newUrl = $userUsed ? false: $userUsed['userpage']; , */ if($newUrl ) header("location:".$newUrl); else header("location:index.php" ; Please, these codes are open to suggerstions. |
| Re: Help In Php Programing by dee5(m): 5:58pm On Nov 26, 2010 |
^^ nice tip |
| Re: Help In Php Programing by mikkytrio(m): 3:59pm On Nov 29, 2010 |
thanks but ıt ıs not so secured, because a sql query ran in the browser can acess the database. |
Which Programing Language Is Best To Start With • Online Shopping System In Php Documentation Help • Running Python Codes In Php • 2 • 3 • 4
Wp - Member Plugin For Wordpress, Register Link Not Showing • How Are Short Codes Developed By Telecom Coys • Mcts
;