hello, i would like to know the code to redirect my site to another page once i have submitted information to a registration page, the code i have is this:

require_once('extensions/register.php');

?>
<link rel="stylesheet" href="stylee.css" type="text/css" />
<form name="register" id="register" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" style="display:inline;">
<table width="100%"  border="1" cellspacing="0" cellpadding="5">
  <tr><br><br><br><br><div id="container">
    <td colspan="2"><div align="center"><font color="#999999" size="4"><img src="imagess/register.jpg"</img><br>Fields marked with a<FONT COLOR="FF0000">*</font> are required.</</font></div></td>
    </tr>
    <?php
    if($message != NULL){
    ?>
  <tr bgcolor="#FFDDDD">
    <td colspan="2"><strong><font color="#FF0000"><?php echo $message;?></font></strong></td>
  </tr>
  <?php } ?>
  <tr>
    <td width="50%"><div align="right">Your <b>exact</b> name<b>:</b></div> </td>
    <td width="50%"><input name="user_name" type="text" id="user_name" value="<?php echo $_POST['user_name'];?>"> 
      <FONT COLOR="FF0000">*</font> </td>
  </tr>
  <tr>
    <td width="50%"><div align="right">Your <b>exact</b> email<b>:</b></div> </td>
    <td width="50%"><input name="user_email" type="text" id="user_email" value="<?php echo $_POST['user_email'];?>">
      <FONT COLOR="FF0000">*</font><?php if($CF_E_VER == 1){echo ' AND requires confirmation';}?> </td>
  </tr>
  <tr>
    <td width="50%"><div align="right">Mailing List<b>:</b></div> </td>
    <td width="50%"><?php if($_POST['user_in_list'] == '1' || $_POST['user_in_list'] == NULL){$sel = ' checked';}else{$sel=NULL;}?>
      <input name="user_in_list" type="radio" value="1"<?php echo $sel;?>>

</td>
  </tr>
  <tr>
    <td><div align="right">Please select a password<b>:</b></div> </td>
    <td width="50%"><input name="user_password" type="password" id="user_password" value="">
      <FONT COLOR="FF0000">*</font> </td>
  </tr>
  <tr>
    <td><div align="right">Re-enter the password<b>:</b></div> </td>
    <td width="50%"><input name="user_password2" type="password" id="user_password2">
      <FONT COLOR="FF0000">*</font> </td>
  </tr>
  <?php
  foreach($array_custom as $field){
  ?>
  <tr>
    <td><?php echo $field['field_name'];?></td>
    <td width="50%"><input name="fieldxy_<?php echo $field['field_id'];?>" type="text" id="fieldxy_<?php echo $field['field_id'];?>" value="<?php echo $_POST['fieldxy_'.$field[field_id]];?>">
<?php if($field['is_required'] == 1){ echo '[Required]';} ?> </td>
  </tr>
  <?php } 
  if($CF_CAPTHCA == 'IMAGE'){?>
  <tr>
    <td><div align="right">Enter Verification Code:</div> </td>
    <td><table  border="0" cellspacing="0" cellpadding="5">
           <tr>
        <td class="acont"><div align="center">
            <?php
                $referenceid = md5(mktime()*rand());
                //Generate the random string
                $chars = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J","k",
                "K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T","u","U","v",
                "V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
                $length = $CF_LENGH;
                $textstr = "";
                for ($i=0; $i<$length; $i++) {
                   $textstr .= $chars[rand(0, count($chars)-1)];
                }
                $new_string = encode_decode($textstr,$CF_ENCDEC);
                $image_link = bin2hex($new_string);
                ?>
            <img src="captcha.php?code=<?php echo $image_link;?>">
            <input name="registration_id" type="hidden" id="registration_id" value="<?php echo $image_link;?>">
        </div></td>
      </tr>
      <tr>
        <td class="acont"><div align="center">
            <input name="answer" type="text" id="answer">
        </div></td>
      </tr>
    </table></td>
  </tr>
  <?php
  } else {
    $f = fopen($CF_QUESTIONFILE,'r');
    while($t = fread($f,102465)){
        $content .= $t;
    }
    fclose($f);
    $content = trim(preg_replace('/\/\*.*\*\//ism', '', $content));
    $temp = explode("\n",$content);
    $random = rand(0,count($temp)-1);
    $rand = $temp[$random];
    list($question,$registration_id) = explode('\n\\',$rand);
    $registration_id = bin2hex(encode_decode($registration_id,$CF_ENCDEC));
  ?>
  <tr>
    <td><div align="right">Answer this:<strong><?php echo $question;?></strong></div></td>
    <td><input name="answer" type="text" id="answer" value="<?php echo $_POST['answer'];?>">
      <input name="registration_id" type="hidden" id="registration_id" value="<?php echo $registration_id;?>"> <FONT COLOR="FF0000">*</font></td>
       </tr>
<?php } ?>
    <td colspan="2"><div align="center">
      <input type="submit" name="Submit" id="Submit" value="Register">
      <input name="S_ID" type="hidden" id="S_ID" value="4">
    </div></td>
    </tr>
  <tr>
    <td colspan="2"><div align="center">[<a href="login.php">Login</a> - <a href="forgotpass.php">Forgot Password</a>] </div></td>
  </tr>
</table>
</form><br>
<center><a href="index.html">GO BACK</a><br><br><b><u> <font color="#FF0000"> Please check your junk folder for your confirmation email</font></u></b></center>

at the end i was thinking of putting this code:

?>
<script>location.replace('<?php echo $thankyou;?>')</script>
<?php
}
die();
?>

but where ever i put that on the page it just stops the webpage from loading

i hope this is all the information you need thankyou

Recommended Answers

All 7 Replies

Member Avatar for diafol

eek. Use [ CODE ] tags!

what?

Member Avatar for diafol

the [ CODE ] tag button on the editor. You didn't use it, so your code is very hard to read.

how is it hard to read i see it fine....

Member Avatar for diafol

Ok fine. But you're the one asking for help. I would have thought that you'd want to make it as easy as possible for others to help you. If you're not bothered, neither am I. Bye.

fuck you.

Member Avatar for diafol

:) makes it easy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.