Jump to content

Archived

This topic is now archived and is closed to further replies.

chriscloyd

function calling

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.