Jump to content

Refresh... refresh... refresh...


Mr_J

Recommended Posts

Webpage where you need to register and login before you can PURCHASE my product.

1st step: Register

step2: Login

Step3: Buy the Item.

After registration, I use the meta refresh to goto Login.php

Enter the user and password. My form gets processed and it stops at Login_Success.php where you must click on "CONTINUE". When I click continue, the correct page appear BUT it refresh itself every 5 seconds  :wtf:

I will add the code, it's a bit messy but here is

login_success.php

<?php          //hierdie kom in elke page wat net deur members gesien mag word
session_start();
if(!$_SESSION['myusername'])
{echo 'Please Login or Register';}
?>

<html>
<head>

</head>
<body>
<h1> </h1>
<center>
<p>Login Successful</p>
<p><a href="buynow.php"><input type="button" value="Continue"></a></p>
</center>
</body>
</html>

This the page to make the purchase. It is a form that will send mail with the order details... No money or transactions here

buynow.php

<?php          //hierdie kom in elke page wat net deur members gesien mag word
##session_start();
##if(!session_is_registered(myusername)){
##header("location:main_login.php");
##}
session_start();
if(!$_SESSION['myusername'])
{echo 'Please Login or Register';}

require_once( dirname(__FILE__).'/buy/form.lib.php' );
phpfmg_display_form();
function phpfmg_form( $sErr = false ){
        $style=" class='form_text' ";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
<title>Pharmacy.za.org - Order Form</title>
<link rel="stylesheet" type="text/css" href="style.css" >
<style type="text/css">
.style2 {
                text-align: center;
}

<!-- MYNE -->

/*
body{
    margin-left: 18px;
    margin-top: 18px;
}

body{
    font-family : Verdana, Arial, Helvetica, sans-serif;
    font-size : 13px;
    color : #474747;
    background-color: transparent;
}
*/
select, option{
    font-size:13px;
}

ol.phpfmg_form{
    list-style-type:none;
    padding:0px;
    margin:0px;
}

ol.phpfmg_form li{
    margin-bottom:5px;
    clear:both;
    display:block;
    overflow:hidden;
    /*width: 100%*/
}


.form_field, .form_required{
    font-weight : bold;
}

.form_required{
    color:red;
    margin-right:8px;
}
.col_field {
    margin:0 0 0 0;
    }
.field_block_over{
}

.form_submit_block{
    padding-top: 3px;
}

.text_box, .text_area, .text_select {
    width:300px;
}

.text_area{
    height:80px;
}

.form_error_title{
    font-weight: bold;
    color: red;
}

.form_error{
    background-color: #F4F6E5;
    border: 1px dashed #ff0000;
    padding: 10px;
    margin-bottom: 10px;
}

.form_error_highlight{
    background-color: #F4F6E5;
    border-bottom: 1px dashed #ff0000;
}

div.instruction_error{
    color: red;
    font-weight:bold;
}

hr.sectionbreak{
    height:1px;
    color: #ccc;
}
</style>
</head>

<body>

<div id="container">

<div id="header">

<div id="header_left">
<h1>Pharmacy<span class="red">.za.org</span></h1>
<h2>CompuREP</h2>
</div>

<div id="header_right">

<p class="welcome">
    <a href="logout.php">Logout</a> 
</p>

  </div>
  
</div>
<div id="left">

<h4><span class="menu_first_letter">Navigation</span></h4>

<div id="navcontainer">
<ul id="navlist">
<li><a href="index.php">Home</a></li>
<li><a href="buynow.php">Products</a></li>
<li><a href="about_us.html">About us</a></li>
<li><a href="sitemap.html">Site map</a></li>
</ul>
</div>

<h4>Contact us </h4>

</div>

<div id="right">

<p class="style2"><img SRC="images/Image1.jpg" WIDTH="214" HEIGHT="93" /></p>
<blockquote>Please complete the Order Form below.</blockquote>
<p style="text-align:center;">
<img src="images/bp.png" width="159" height="140" alt="MedSET BPM" title="MedSET BPM">  
<img src="images/oxy2.gif" height="140px" alt="MedSET Oxygen" title="MedSET Oxygen">  
<img src="images/meter3.gif" class="style2" alt="MedSET GCU" title="MedSET BP-202H" width="159" height="140">
</p>
<p> </p>


<!-- My form begin -->
<form name="frmFormMail" action='' method='post' enctype='multipart/form-data' onsubmit='return fmgHandler.onsubmit();'>
<input type='hidden' name='formmail_submit' value='Y'>
<div id='err_required' class="form_error" style='display:none;'>
    <label class='form_error_title'>Please check the required fields</label>
</div>
            
            
<ol class='phpfmg_form' style="width: 520px" >

<li class='field_block' id='field_0_div' style="width: 520px">
<div class='col_label' style="width: 520px">
    <label class='form_field'>Product</label> <label class='form_required' >*</label> </div>
    <div class='col_field'>
    <?php phpfmg_dropdown( 'field_0', "Please select|MedSET BP Monitor|MedSET Oxygen Concentrator|MedSET GCU 3-in-1", '' );?>
    <div id='field_0_tip' class='instruction'>Please select Product</div>
    </div>
</li>

<li class='field_block' id='field_1_div'><div class='col_label'>
    <label class='form_field'>Qty</label> <label class='form_required' >*</label> </div>
    <div class='col_field'>
    <input type="text" name="field_1"  id="field_1" value="<?php  phpfmg_hsc("field_1"); ?>" class='text_box'>
    <div id='field_1_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_2_div'><div class='col_label'>
    <label class='form_field'>Entity</label> <label class='form_required' >*</label> </div>
    <div class='col_field'>
    <?php phpfmg_dropdown( 'field_2', "Please select|Individual|Company", '' );?>
    <div id='field_2_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_3_div'><div class='col_label'>
    <label class='form_field'>Name</label> <label class='form_required' > </label> </div>
    <div class='col_field'>
    <input type="text" name="field_3"  id="field_3" value="<?php  phpfmg_hsc("field_3"); ?>" class='text_box'>
    <div id='field_3_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_4_div'><div class='col_label'>
    <label class='form_field'>Company Name</label> <label class='form_required' >
     </label> </div>
    <div class='col_field'>
    <input type="text" name="field_4"  id="field_4" value="<?php  phpfmg_hsc("field_4"); ?>" class='text_box'>
    <div id='field_4_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_5_div'><div class='col_label'>
    <label class='form_field'>VAT no</label> <label class='form_required' > </label> </div>
    <div class='col_field'>
    <input type="text" name="field_5"  id="field_5" value="<?php  phpfmg_hsc("field_5"); ?>" class='text_box'>
    <div id='field_5_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_6_div'><div class='col_label'>
    <label class='form_field'>Accept Terms</label> <label class='form_required' >
    *</label> </div>
    <div class='col_field'>
    <?php phpfmg_checkboxes( 'field_6', "Accept|Do NOT Accept" );?>
    <div id='field_6_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_7_div'><div class='col_label'>
    <label class='form_field'>Spesial Instructions</label> <label class='form_required' >
     </label> </div>
    <div class='col_field'>
    <textarea name="field_7" id="field_7" rows=4 cols=25 class='text_area'><?php  phpfmg_hsc("field_7"); ?></textarea>

    <div id='field_7_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_8_div'><div class='col_label'>
    <label class='form_field'>Delivery Address</label> <label class='form_required' >
    *</label> </div>
    <div class='col_field'>
    <textarea name="field_8" id="field_8" rows=4 cols=25 class='text_area'><?php  phpfmg_hsc("field_8"); ?></textarea>

    <div id='field_8_tip' class='instruction'></div>
    </div>
</li>

<li class='field_block' id='field_9_div'><div class='col_label'>
    <label class='form_field'>Contact Tel</label> <label class='form_required' >
    *</label> </div>
    <div class='col_field'>
    <input type="text" name="field_9"  id="field_9" value="<?php  phpfmg_hsc("field_9"); ?>" class='text_box'>
    <div id='field_9_tip' class='instruction'></div>
    </div>
</li>


<li class='field_block' id='phpfmg_captcha_div'>
    <div class='col_label'><label class='form_field'>Security Code:</label> <label class='form_required' >
                    *</label> </div><div class='col_field'>
    <?php phpfmg_show_captcha(); ?>
    </div>
</li>


            <li>
            <div class='col_label'> </div>
            <div class='form_submit_block col_field'>
    
                <input type='submit' value='Submit' class='form_button'>
                <span id='phpfmg_processing' style='display:none;'>
                    <img id='phpfmg_processing_gif' src='<?php echo PHPFMG_ADMIN_URL . '?mod=image&func=processing' ;?>' border=0 alt='Processing...'> <label id='phpfmg_processing_dots'></label>
                </span>
            </div>
            </li>
            
</ol>
            
            


</form>




<?php
            
    phpfmg_javascript($sErr);
    }

?>
</div>
<!-- Einde van MyForm -->
<div id="footer">
<a href="http://www.pharmacy.za.org/pp.html">Privacy Policy</a> |
<a href="disclaimer.html">Disclaimer</a> |
© <?php echo date('Y');?> All Rights Reserved.</div>
</body>
</html>

 

Why does BUYNOW refresh every 5 odd seconds. I have noticed that if I press Esc it stops loading/refresh

Link to comment
https://forums.phpfreaks.com/topic/219440-refresh-refresh-refresh/
Share on other sites

Archived

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

×
×
  • Create New...

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.