well i have a minor problem see i got a page where i used php as an iframe and then i have a user system code under the folder user.....

now on a form i want to include the Iframe so the page wont go into another window and on top of that i need to include the action

this is the original code

<form action="register.php?action=register" method="post">

now i tried changing it so it can stay in my regualr .php page so i did this

<form action="thegold.php?page=user/register" action="register" method="post">

heres the code that starts up the register

<?php
extract($HTTP_GET_VARS); 
extract($HTTP_POST_VARS);
include("config.php");
if($action == "register")
{
   

and i am doing a user system thing so i need the action to be registed so when the person signs up he actually registers into the thing and i want the person to also be able to be in the same page.....

please and thanks

    can you post all your code? i honestly don't understand what you are asking or saying is the problem... and hope that by looking at your code, i will understand the problem better...

      alright then here we go

      this is the code for the registration

      
      <?php
      extract($HTTP_GET_VARS); 
      extract($HTTP_POST_VARS);
      include("config.php");
      if($action == "register")
      {
      $loginip = $_POST['loginip'];
      $email = $_POST['email'];
      $fullname = $_POST['fullname'];
      $username = $_POST['username'];
      $password = $_POST['password'];
      
      $strip = $loginip ;
      $stremail = $email ;
      $strfname = $fullname ;
      $struname = $username ;
      $strpwrd = $password ;
      
      if ((strlen($password) < 5) or (strlen($password) > 50))
      {
      $text1 = "Password";
      $text2 = strlen($strpwrd);
      include ("_inc/regmissing.htm"); exit();
      }
      if (ereg("[^A-Za-z0-9]", $password))
      {
      $text1 = "Password";
      include ("_inc/regumissing.htm"); exit();
      }
      
      
      if ((strlen($email) < 5) or (strlen($email) > 50))
      {
      $text1 = "Email";
      $text2 = strlen($stremail);
      include ("_inc/regmissing.htm"); exit();
      }
      if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.
      '@'.
      '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
      '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email))
      {
      include ("_inc/regemissing.htm"); exit;
      }
      if ((strlen($fullname) < 5) or (strlen($fullname) > 50))
      {
      $text1 = "Full Name";
      $text2 = strlen($strfname);
      include ("_inc/regmissing.htm"); exit;
      }
      if ((strlen($username) < 5) or (strlen($username) > 30))
      {
      $text1 = "Username";
      $text2 = strlen($struname);
      include ("_inc/regmissing.htm"); exit();
      }
      if (ereg("[^A-Za-z0-9]", $username))
      {
      $text1 = "Username";
      include ("_inc/regumissing.htm"); exit();
      }
      $u_path = "$userdb/profile-{$username}.dat";
      if (file_exists($u_path))
      {
      $text1 = $username;
      include ("_inc/regerror.htm"); exit();
      }
      $u_data = $email."}{".$fullname."}{".$username."}{".$password."}{".date("d-M-y")."}{".$loginip."}{";
      $to = $email;
      $syndikutcp = date("Y");
      $syndikut = "Powered by Download Manager Ultra-Lite Copyright $syndikutcp www.syndikut.org";
      $subject="$company - Registration";
      $mess = "Hi $strfname\n\nYou can now login with the username & password below:\n\nUsername: $username \n\nPassword: $password\n\n$company\n\n$companyurl\n\n_______________________________________________________________\n$syndikut";
      $mailheaders="Return-path: $adminnoreply\n";
      $mailheaders.="From: $adminnoreply\n";
      $mailheaders.="Reply-To: $adminnoreply\n";
      $sent = 1;
      $uf = fopen($u_path, "w");
      fputs($uf, $u_data);
      fclose($uf);
      if($sent == 1)
      {
      mail($to, $subject, $mess, $mailheaders);
      }
      else
      {
      echo "Please check that you have provided the correct email address, we are unable to send the password to the email you specified."; exit;
      }
      include ("_inc/regdone.htm"); exit();
      }
      else
      {
      include("_inc/reg.htm"); exit();
      }
      ?>
      

      <h4 align="center">&nbsp;</h4>
      <h4 align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Please
      fill in the following details to register:</font></h4>
      <p align="center"><font color="#333333" size="2" face="Verdana, Arial, Helvetica, sans-serif">Your
      password will be automatically generated &amp; sent to verify your email
      address!</font></p>
      <form action="user/register.php?action=register" action="register" method="post">
      <table>
      <tr>
      <td width="70" height="21">&nbsp;</td>
      <td width="164"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input name="loginip" type="hidden" id="loginip" value="<?php echo $loginip; ?>">
      </font></td>
      </tr>
      <tr>
      <td><div align="center">Email:</font></div></td>
      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input type="text" name="email" value="">
      <font color="#FF0000"></font> </font></td>
      </tr>
      <tr>
      <td><div align="center">Full
      Name:</font></div></td>
      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input type="text" name="fullname" value="">
      <font color="#FF0000">
      </font> </font></td>
      </tr>
      <tr>
      <td><div align="center">Username:</font></div></td>
      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input type="text" name="username" value="">
      <font color="#FF0000"></font> </font></td>
      </tr>
      <tr>
      <td height="24"><div align="center">Password:</font></div></td>
      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
      <input name="password" type="text" id="password">
      <font color="#FF0000">
      </font></font></td>
      </tr>
      </table>
      <p>
      <input type="submit" value="Register">
      </p>
      </form>
      <p><font color="#FF0000" size="1" face="Verdana, Arial, Helvetica, sans-serif">*</font><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
      Required fields</font></p>
      <p>&nbsp;</p>
      <p></font></p>
      </div></td>
      </center>

      this is the html code the bold part is where the code goes for the action in the php code.......

      now this is in a page

      http://www.hostultra.com/~Unify/thegold.php

      now if you click on register [dont fill in the form] and click on register again below the form a new page will pop up

      now what i want to do

      is make that page stay in the same place where the registration form was and where the content is supposed to be but at the same time i want it to do the action so when the person registers it will be saved into my other folder in order for em to login....

      now im having problems with the action code and i want to know what should it be?

      B] <form action="user/register.php?action=register" action="register" method="post">
      [/B]

      for this........should i replace the user/register.php with the content code which is

      thegold.php?

      and then after that put in action=register so it can be like this......

      thegold.php?action=register

      i tried it and it wont work BECAUSE i need to support the file register.php and then action it up into there.........

      reply with suggestions

      please and thanks

      (click on my site so you can get an idea)

      hehe

        OK, I think I am beginning to understand you. Well, it is not possible to specify two differnt actions in the opening <form> tag.

        So, you could do something like what you were almost doing:

        [INDENT]<form action="user/register.php?action=register" method="post">[/INDENT]

        And then you can check to see if the action isset:

        [INDENT]if(isset($GET['action']) && $GET['action'] == 'register'){
        // do reg stuff here...
        }
        [/INDENT]

        OR, you can specify the action to be the page you are currently on.

        So, I would try something like this to post the form to itself:

        <?php
        // if the form has NOT been submitted, display form:
        if(!isset($_POST['submit'])){
        ?>
        <center>
        <h4>Please  fill in the following details to register:</h4>
        <p>Your password will be automatically generated &amp; sent to verify your email 
           address!</p>
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        <table>
        <tr>
          <td>Email:</td>
          <td><input type="text" name="email"></td>
        </tr>
        <tr> 
          <td>Full Name:</td>
          <td><input type="text" name="fullname"></td>
        </tr>
        <tr> 
          <td>Username:</td>
          <td><input type="text" name="username"></td>
        </tr>
        <tr> 
          <td>Password:</td>
          <td><input type="text" name="password"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>
          <input type="submit" name="submit" value="Register">
          <input name="loginip" type="hidden" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>">
          </td>
        </tr>
        </table>
        </form>
        </center>
        <?php
        }
        // else form HAS been submitted, process form:
        else {
        
        // loop through posted values
        foreach($_POST as $var => $val) { 
        	if (!empty($val)){
        		$$var = trim($val);
        	}
        	else {
        		echo 'You did not fill out the form completely. Please go back.';
        		exit;
        	}
        }
        
        include('config.php');
        $strip = $loginip;
        $stremail = $email;
        $strfname = $fullname;
        $struname = $username;
        $strpwrd = $password;
        
        // if password is too long or too short
        if ((strlen($password) < 5) or (strlen($password) > 50)) 
        {
        	$text1 = 'Password';
        	$text2 = strlen($strpwrd);
        	include ('_inc/regmissing.htm'); 
        	exit();
        }
        
        // if password format is incorrect
        if (ereg("[^A-Za-z0-9]", $password))
        {
        	$text1 = 'Password';
        	include ('_inc/regumissing.htm'); 
        	exit();
        }
        
        // if email is too long or too short
        if ((strlen($email) < 5) or (strlen($email) > 50))
        {
        	$text1 = 'Email';
        	$text2 = strlen($stremail);
        	include ('_inc/regmissing.htm'); 
        	exit();
        }
        
        // if email format is incorrect
        if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.
        '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
        '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email))
        {
        	include ('_inc/regemissing.htm'); exit;
        }
        
        // if fullname too long or too short
        if ((strlen($fullname) < 5) or (strlen($fullname) > 50))
        {
        	$text1 = 'Full Name';
        	$text2 = strlen($strfname);
        	include ('_inc/regmissing.htm'); 
        	exit;
        }
        
        // if username too long or too short
        if ((strlen($username) < 5) or (strlen($username) > 30))
        {
        	$text1 = 'Username';
        	$text2 = strlen($struname);
        	include ('_inc/regmissing.htm'); 
        	exit();
        }
        
        // if username incorrect format
        if (ereg("[^A-Za-z0-9]", $username))
        {
        	$text1 = 'Username';
        	include ('_inc/regumissing.htm'); 
        	exit();
        }
        
        $u_path = "$userdb/profile-{$username}.dat";
        if (file_exists($u_path))
        {
        	$text1 = $username;
        	include ('_inc/regerror.htm'); 
        	exit();
        }
        
        $u_data = $email . "}{" . $fullname . "}{" . $username;
        $u_data .= "}{".$password."}{".date("d-M-y")."}{".$loginip."}{";
        $to = $email;
        $syndikutcp = date("Y");
        $syndikut = "Powered by Download Manager Ultra-Lite Copyright ";
        $syndikut .= "$syndikutcp www.syndikut.org";
        $subject="$company - Registration";
        $mess = "Hi $strfname\n\nYou can now login with the username & password";
        $mess .= "below:\n\nUsername: $username \n\nPassword: ";
        $mess .= "$password\n\n$company\n\n$companyurl\n\n";
        $mess .= "_______________________________________________________________";
        $mess .= "\n$syndikut";
        $mailheaders = "Return-path: $adminnoreply\n";
        $mailheaders .= "From: $adminnoreply\n";
        $mailheaders .= "Reply-To: $adminnoreply\n";
        $sent = 1;
        $uf = fopen($u_path, "w");
        fputs($uf, $u_data);
        fclose($uf);
        if($sent == 1)
        {
        	mail($to, $subject, $mess, $mailheaders);
        }
        else
        {
        	echo "Please check that you have provided the correct email address, 
        		we are unable to send the password to the email you specified."; 
        	exit;
        }
        
        // if reg complete
        include ("_inc/regdone.htm"); 
        exit();
        }
        ?>
        

          awesome the code did it..........even though i had to do some modifications to it 🙂 so it can fit my likings

          but thanks alot rodney you did it again 😉

          only thing now is im having problems loginging my user system grrrr

          i'll try and fix that if not i'll come to you again

          thanks man appreciate it

            Write a Reply...