Jump to content


Photo

function calling


  • Please log in to reply
1 reply to this topic

#1 chriscloyd

chriscloyd
  • Members
  • PipPipPip
  • Advanced Member
  • 489 posts
  • LocationArizona

Posted 13 March 2006 - 12:29 AM

how do u call a function threw a link please help me this is my function
$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;
  }
}

44 bugs in my java code
44 bugs in my java code
Fix 1 bug, and complie again
122 bugs in my java code

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 13 March 2006 - 01:35 AM

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users