chriscloyd Posted March 13, 2006 Share Posted March 13, 2006 how do u call a function threw a link please help me this is my function[code]$MM_flag="MM_insert";if (isset($_POST[$MM_flag])) { $MM_dupKeyRedirect="index.php?module+=usernameexist"; $loginUsername = $_POST['username']; $LoginRS__query = "SELECT username FROM users WHERE username='" . $loginUsername . "'"; mysql_select_db($database_jarrod, $jarrod); $LoginRS=mysql_query($LoginRS__query, $jarrod) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); //if there is a row in the database, the username was found - can not add the requested username if($loginFoundUser){ $MM_qsChar = "?"; //append the username to the redirect page if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&"; $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername; header ("Location: $MM_dupKeyRedirect"); exit; }}[/code] Quote Link to comment Share on other sites More sharing options...
toplay Posted March 13, 2006 Share Posted March 13, 2006 You can't. Look into trying what you want with JavaScript/AJAX, or learn more about PHP server side scripting and passing of URL/Get parameters. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.