c9-adams's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Active Members
Active Posts:
99 (0.09 per day)
Joined:
12-December 11
Profile Views:
1,408
Last Active:
User is offline Apr 16 2013 06:20 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   c9-adams has not set their status

Posts I've Made

  1. In Topic: XML and PHP widget

    Posted 23 Feb 2013

    what is a permission issue?
  2. In Topic: Inserting data into database

    Posted 13 Feb 2013

    I have got rid of the spaces in the field names however this is having no impact still.
  3. In Topic: javascript validation

    Posted 31 Jan 2013

    Thanks for all your help guys.
  4. In Topic: javascript validation

    Posted 29 Jan 2013

    Still no luck, i am probably returning the form validation wrong.
  5. In Topic: javascript validation

    Posted 29 Jan 2013

    Unfortunately still no luck, this is my whole page:

    
    <?php
    // Redirect if this page was accessed directly: 
    if (!defined('BASE_URL')) { 
    
        // Need the BASE_URL, defined in the config file: 
        require_once ('../includes/config.inc.php'); 
         
        // Redirect to the index page: 
        $url = BASE_URL . 'index.php'; 
        header ("Location: $url"); 
        exit; 
         
    } // End of defined() IF. 
    
    ?> 
    <?php 
    if(!isset($_SESSION['username'])) {
    echo "Welcome Guest!"; 
    } else {
    echo "<font color='red'>You are logged in as </font><font color='purple'>$_SESSION[username].</font><font color='orange'><a href='index.php?p=logout'>  logout?</a> </font><br><font color='red'>Dont forget $_SESSION[username]. always feel free to contact us for support when needed most</font><br><br>";
    }
    ?>
    <h2>Checkout</h2> 
    <?php  
    include"config2.php";
            $total = $_GET['total']; //this total variable will read the url for the total sum of the products. 
    $user=$_SESSION['username']; //using a session to find the user's username.
    //select shipping address of the user to allow the user to decide whether the address which they registered with is still correct.	
            $result = mysql_query("SELECT * FROM users WHERE username='".$user."'"); 
            $row = mysql_fetch_array($result); 
             
            echo
                    '<p> Your shipping address is: <br /> 
    				<br>
                    <b>'.$row['address'].'<br /> 
    				</br>
                    </b> 
                    </p> 
             
            <p>The total payable amount for this purchase is <b>&pound;'.$total.'</P>'; ?> 
    	<!--  the following is a form which is used for the user to enter their payment information.   -->
    	<script type="text/javascript">
    	function validateForm()
    {
    var x=document.forms["checkout"]["num"].value;
    	if (x.length < 16){
        alert("Your credit card must be 16 digits long.");
        return false;
    }
    	</script>
    <table width="95%" border="0" cellspacing="2" cellpadding="2"> 
      <tr> 
        <td height="100" valign="top" class="paddingLeft"><form action="index.php"  method="GET" name="checkout" id="checkout" onsubmit="return validateForm()"> 
            <p> 
              <input id="p" name="p" type="hidden" value="conf"/> 
              <?php echo '<input id="amount" name="amount" type="hidden" value="'.$total.'"/>';  ?> Card Number</br> 
              <input type="text" name="num" size="30" maxlength="35" placeholder="Card Number" /> 
              <br /> 
              Name on the Card</br> 
              <input type="text" name="bearer" size="30" maxlength="35" placeholder="Name on the Card" /> 
              <br /> 
              Valid From (mmyy)</br> 
              <input type="text" name="syear" size="4" maxlength="4" /> 
              <br /> 
              Valid Till (mmyy)</br> 
              <input type="text" name="fyear" size="4" maxlength="4" /> 
              <br /> 
              Card Type</br> 
              <input type="text" name="type" size="30" maxlength="35" placeholder="Card Type" /> 
              <br /> 
              <input type="submit" value="Proceed" /> 
              <br /> 
          </form></td> 
      </tr> 
    </table> 
    <p><a href="index.php?p=products">Do you want to continue shopping?</a></p>
    <img src="images/checkout.jpg" alt="cart" id="cart" width="80" height="80">
    
    
    

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

c9-adams hasn't added any friends yet.

Comments

c9-adams has no profile comments yet. Why not say hello?