Jump to content

I-AM-OBODO

Members
  • Posts

    439
  • Joined

  • Last visited

Posts posted by I-AM-OBODO

  1. i have designed a login that works fine.

    users could login, but the problem is when i clicked to see a users details it does not show details.

    unless i indicate the users name.

     

    when two or more registers, it display just the first registerd person, that means it brings the detail that is partaining to another user. thats my problem

     

  2. please where can i find a tutorial on this stuff or better still where i can get a script so i can modify it to suite my taste

    1. a user registers with his details

    2. login wit his username and password

    3. when he clicks on a link sees all his personal details (which will contain all his transactions)

    4. logs out.

     

    the one i designed don't show the transaction the user did.

    will appreciate a link to a tutorial or a script so i could modify.

     

    thanks

  3. if you go through the code, you'll notice that it has been reassigned, so after clicking go back, it returns an empty result

     

    but i want the result that was parsed to the page3 and still on the page3 it must be reassigned?

     

    thanks

  4. what am actualy saying is that is there a way to recal a session after it has been renamed? take for instance:

     

    Page1.php

    <? session_start(); ?>

    <form id="form1" name="form1" method="post" action="page2.php">

      <table width="100%" border="0" cellspacing="2" cellpadding="0">

        <tr>

          <td>Amount:  <input name="amount" type="text" id="amount" /></td>

        </tr>

        <tr>

          <td> 

            <input name="trxref" type="hidden" value="<? $rand = range(0,10);

    shuffle($rand);

    echo implode(' ',array_slice($rand,0,8)); ?>" /></td>

        </tr>

        <tr>

          <td> </td>

        </tr>

        <tr>

          <td>

     

    Page2.php

    <? session_start(); ?>

      <? $_SESSION['amount'] = $amount=$_REQUEST['amount'];

      $_SESSION['trnxref'] = $trxref=$_REQUEST['trxref'];

    ?>

     

    Amount = <font color="#000066" ><b><?php echo $_SESSION[amount]; ?>

    <p>

    Transanction Ref = <font color="#000066" ><b><?php echo $_SESSION['trnxref'];

    ?></p>

    <p>Click to make <a href="page3.php">payment</a>  </p>

    </body>

     

    Page3.php

    <html>

    <head>

    <title>Untitled Document</title>

    </head>

    <body>

    <p>

      <?php

    $amt = $_SESSION['amount'];

    $txRef = $_SESSION['trnxref'];

    ?>

     

    Amount = <font color="#000066" ><b><?php echo $amt; ?></b>

    <br>

    Transanction Ref = <font color="#000066" ><b><?php echo $txRef; ?>

    </p>

    </p>

    <p><a href="page2.php">Go Back</a>

    </p>

    </body>

    </html>

     

    Thats it. I if i click on go back, i want the details (i.e amount and trnxref ref to display) knowing well that the value of amount and trnxref have been reassigned in page3. is there a way i could get these values back if i go to page2?

     

    Hope it helps

    Thanks

  5. Helo all,

    I am designing a site that has to do with transaction. i want after each transaction a confirmation be display to the client showing the transaction status wether failed or completed. there is a code that represents each transaction status. each transaction is moved on to another page via session, the problem am having is that after a failed transaction, i tried to anchor to the sattus of failed transfer to payment page but the payment details does appear on the payment page again, i want a situation where the payment details will appear to the client notifying them of failed transfer to to retry the payment again with having to fill all the forms they've filled before.

     

    Thanks

  6. Thanks all for your help. Finaly i gat it done and working. This is how i did it.

     

    
    <?php
    mysql_connect ("localhost", "name","password") or die (mysql_error());
    mysql_select_db ("database");
    
    $keyword = $_POST['keyword'];
    if ( $keyword == '' ) {
    die("Query failed. Ensure you gave a criteria");}
    
    $sql = mysql_query("SELECT * FROM easylife WHERE Firstname LIKE '%$keyword%' OR Middlename LIKE '%$keyword%' ");
    
    while ($row = mysql_fetch_array($sql)){
    echo 'Transaction Ref: '.$row['txnref'];
    echo '<br/> Beneficiary: '.$row['Beneficiary'];
    echo '<br/> Amount: '.$row['amount'];
    echo '<br/> PaymentType: '.$row['PaymentType'];
    echo '<br/> Address: '.$row['Address'];
    echo '<br/> Firstname: '.$row['Firstname'];
    echo '<br/> Surname: '.$row['Surname'];
    echo '<br/> Middlename: '.$row['Middlename'];
    echo '<br/> Phone: '.$row['Phone'];
    echo '<br/><br/>';
    }
    ?>
    
    but the funny thing is that if no criteria was provided on the on the search box, it brings out all the entry in the database.
    how do i stop that now, cos my validation is not okay. but am still trying something.
    help will be appreciated
    
    thanks all once again

  7. I have users in my database, but i want to be able to perform a search by a criteria eg username or transaction ref, how do i go about that, cos i tried using select where, but it seems not working. i need a better way if my way is not good.

    thankz

     

    here is what i did:

     

    <?php
    include_once("../includes/connection.php");
    ?>
    <?php
    $result = mysql_query( "SELECT * FROM easylife WHERE Firstname LIKE '%$keyword'" )
    or die("SELECT Error: ".mysql_error());
    $num_rows = mysql_num_rows($result);
    
    while ($get_info = mysql_fetch_row($result)){ 
    
    foreach ($get_info as $field) 
    
    print "</tr>\n";
    }
    print "</table>\n";
    mysql_close($link);
    ?>
    <style type="text/css">
    <!--
    .style1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 14px;
    font-weight: bold;
    }
    -->
    </style>
    
    <br>
    <form method="POST" action="choice2.php">
      <span class="style1">Keyword</span> 
      <input name="keyword" type="text" id="keyword" size="25">
    <input name="Submit" type="submit" value="Search">
    <input type="reset">
    
    </form>
    </body>
    </html>
    
    and then....
    
    <?php
    $keyword=$_REQUEST['keyword'];
    $conn = mysql_connect("localhost","user","pasword");
    mysql_select_db("database_db",$conn);
    $sql = "SELECT * FROM easylife WHERE Firstname LIKE '%$keyword%'";
    $result = mysql_query($sql, $conn) or die(mysql_error());
    while ($newArray = mysql_fetch_array($result)) {
    $txnref = $newArray['txnref'];
    $Beneficiary = $newArray['Beneficiary'];
    $amount = $newArray['amount'];
    $PaymentType = $newArray['PaymentType'];
    $Address = $newArray['Address'];
    $StartDate = $newArray['StartDate'];
    $EndDate = $newArray['EndDate'];
    $Firstname = $newArray['Firstname'];
    $Middlename = $newArray['Middlename'];
    $Surname = $newArray['Surname'];
    $OfficialAddress = $newArray['OfficialAddress'];
    $BillingAddress = $newArray['BillingAddress'];
    $Email = $newArray['Email'];
    $Phone = $newArray['Phone'];
    $date_of_order = $newArray['date_of_order'];
    
    }
    ?>
    <style type="text/css">
    <!--
    .style1 {
    color: #000066;
    font-weight: bold;
    }
    -->
    </style>
    
    <a href="select.php">Home</a> | <a href="logout.php">Logout</a>
    <p>
    <h3>Client's Information</h3>
    <table width="351" border="2" cellpadding="1" cellspacing="0" bordercolor="#000000" style="border-collapse:collapse ">
      <tr>
        <td width="104"><strong>Trans Ref</strong></td>
        <td width="231"><span class="style1">
          <label>
          
          <?php echo $txnref ?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>Beneficiary </strong></td>
        <td><span class="style1">
          <label>
          
          <?php echo $Beneficiary ?> </label>
        </span></td>
      </tr>
      
      <tr>
        <td><strong>Amount</strong></td>
        <td><span class="style1">
          <label>
          <?php echo $amount ?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>Payment Type</strong></td>
        <td><span class="style1">
          <label>
         
          <?php echo $PaymentType?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>Address</strong></td>
        <td><span class="style1">
          <label>
         
          <?php echo $Address?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>Start Date</strong></td>
        <td><span class="style1">
          <label>
          
          <?php echo $StartDate ?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>End Date</strong></td>
        <td><span class="style1">
          <label>
          
          <?php echo $EndDate ?> </label>
        </span></td>
      </tr>
      <tr>
        <td><strong>Firstname</strong></td>
        <td><span class="style1"><?php echo $Firstname ?></span></td>
      </tr>
      <tr>
        <td><strong>Middlename</strong></td>
        <td><span class="style1"><?php echo $Middlename ?></span></td>
      </tr>
      <tr>
        <td><strong>Sastname</strong></td>
        <td><span class="style1"><?php echo $Surname ?></span></td>
      </tr>
      <tr>
        <td><strong>Official Address </strong></td>
        <td><span class="style1"><?php echo $OfficialAddress ?></span></td>
      </tr>
      <tr>
        <td><strong>Billing Address </strong></td>
        <td><span class="style1"><?php echo $BillingAddress ?></span></td>
      </tr>
      <tr>
        <td><strong>Email</strong></td>
        <td><span class="style1"><?php echo $Email ?></span></td>
      </tr>
      <tr>
        <td><strong>Phone</strong></td>
        <td><span class="style1"><?php echo $Phone ?></span></td>
      </tr>
    
      <tr>
        <td><strong>Date/Time Ordered </strong></td>
        <td><span class="style1">
          <label for="register"><?php echo $date_of_order ?></label>
        </span></td>
      </tr>
    </table>
    <p>

  8. Thanks men.

    But on my actual page, i did start the sessions. I have gotten a way of passing the sessions to another page, but the problem is, if u go thru this recent post i made, u will see that i have gone a little further. i just want to convert the amount to a variable so that it could go to a session. since it has different values but needs just one the $amount variable in order to parse to the next page, thats where am hanged.

    hoping u understand

     

    thnka alot

  9. The truth is I have ran out of ideas and i am almost going bald cos of this. I will try to explain this as simple as i could.

    I have various product which i represented by code(i.e lets say when a user types FOX in my form, i know what the FOX represents and so also the user) and these codes(i.e FOX) have different value assigned to them.

     

    <?

    $ProductCode = $_POST['ProductCode'];

      if ( $ProductCode == "Fox" ) {

        print "Your Product Choice is Fanta <br> Amount = 5000";

    } elseif ( $ProductCode == "DECO" ) {

        print "Your Product Choice is Coke and Amount = 4000";

    } elseif ( $ProductCode == "COD" ) {

        print "Your Product Choice is Pepsi and Amount = 3000";

    } elseif ( $ProductCode == "CODEX" ) {

        print "Your Product Choice is Lemon and Amount = 2000";

    } else {

      print "<b>YOUR PRODUCT ENTRY IS WRONG. CLICK BACK AND TRY AGAIN</b>";

    }

    ?>

    <?php echo $_SESSION['amount']; ?>

    <? echo $_SESSION['trnxref']; ?>

     

    I have transaction id for each transaction which is randomly generated and i want to parse both the transaction id and the amount to the payment page with these sessions.

     

    <?php echo $_SESSION['amount']; ?>

    <? echo $_SESSION['trnxref']; ?>

     

    The transaction session, i've been able to pass, but the amount i could not pass, since i don't know how to convert the amount above into $amount variable so that it could be stored on the session for onward procession.

    I want it as the above session cos its what the payment facility understands.

     

    Thanks

  10. How can i add bcc to my script and form. the script and form below is working perfectly. if i include more than one email, it shows all the people the same message was sent to. so the question, i dont know how to add the bcc to my html form so it could work with my script. help needed pls

    thanx

     

     

     

    This is my script

     

    <?php

     

    $name=$_POST['name'];

    $email=$_POST['email'];

    $to=$_POST['to'];

    $subject=$_POST['subject'];

    $message=$_POST['message'];

     

     

     

    if(mail($to, $subject, $message,"From: $email\n")) 

    {

     

    echo "Message Sent";

     

    } else {

     

    echo "There was a proble so message was not sent";

     

    }

     

     

    ?>

     

    here is my form:

     

    <form id="form1" name="form1" method="post" action="">

      <table width="100%" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td>Your name      </td>

          <td><input name="name" type="text" id="name" /></td>

        </tr>

        <tr>

          <td>Your Email      </td>

          <td><input name="email" type="text" id="email" /></td>

        </tr>

        <tr>

          <td>Recipient Email      </td>

          <td><input name="to" type="text" id="to" /></td>

        </tr>

        <tr>

          <td>Bcc      </td>

          <td><input name="bcc" type="text" id="bcc" /></td>

        </tr>

        <tr>

          <td>Subject      </td>

          <td><input name="subject" type="text" id="subject" /></td>

        </tr>

        <tr>

          <td width="25%" height="64" valign="top">Message</td>

          <td width="75%" valign="top"><textarea name="message" cols="50" rows="15" id="message"></textarea></td>

        </tr>

        <tr>

          <td> </td>

          <td><input name="send" type="submit" id="send" value="Send" /></td>

        </tr>

        <tr>

          <td colspan="2"> </td>

        </tr>

        <tr>

          <td colspan="2"> </td>

        </tr>

      </table>

    </form>

  11. Helo. How do i insert letters on my unique id.

     

    I mean i designed a form that a user fills to make a request. I want each request a user makes it should have its own unique transaction ID. and since i have more than just one form that needs be filled (on other pages there's form for other transactions), i want to adentify each form with a unique number exaple EN001 for a particular form and SE001 for another form etc.

     

    I tried but dont know a way out of this. These my code:

     

    CREATE TABLE `transactions` (

      `tranxID` int(255) NOT NULL auto_increment,

      `product_code` varchar(50) NOT NULL,

      `trans_type` varchar(50) NOT NULL,

      `pay_type` varchar(50) NOT NULL,

      `fname` varchar(50) NOT NULL,

      `lname` varchar(50) NOT NULL,

      `address` varchar(50) NOT NULL,

      `email` varchar(50) NOT NULL,

      `date_of_order` date NOT NULL,

      PRIMARY KEY  (`tranxID`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

     

    --

    -- Dumping data for table `transactions`

    --

     

    INSERT INTO `transactions` (`tranxID`, `product_code`, `trans_type`, `pay_type`, `fname`, `lname`, `address`, `email`, `date_of_order`) VALUES

    (1, '12345', 'single', 'cheque', 'chidi', 'obodo', '31 ladega', 'people@yahoo.com', '2008-07-18'),

     

    Still cant get thing done. Anyone with any idea how it can get done cos am having head-ache trying to get it done. I want letter before the tranxID (i.e ES0012) thanks

  12. Helo. How do i insert letters on my unique id.

     

    I mean i designed a form that a user fills to make a request. I want each request a user makes it should have its own unique transaction ID. and since i have more than just one form that needs be filled (on other pages there's form for other transactions), i want to adentify each form with a unique number exaple EN001 for a particular form and SE001 for another form etc.

     

    I tried but dont know a way out of this. These my code:

     

    CREATE TABLE `transactions` (

      `tranxID` int(255) NOT NULL auto_increment,

      `product_code` varchar(50) NOT NULL,

      `trans_type` varchar(50) NOT NULL,

      `pay_type` varchar(50) NOT NULL,

      `fname` varchar(50) NOT NULL,

      `lname` varchar(50) NOT NULL,

      `address` varchar(50) NOT NULL,

      `email` varchar(50) NOT NULL,

      `date_of_order` date NOT NULL,

      PRIMARY KEY  (`tranxID`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

     

    --

    -- Dumping data for table `transactions`

    --

     

    INSERT INTO `transactions` (`tranxID`, `product_code`, `trans_type`, `pay_type`, `fname`, `lname`, `address`, `email`, `date_of_order`) VALUES

    (1, '12345', 'single', 'cheque', 'chidi', 'obodo', '31 ladega', 'people@yahoo.com', '2008-07-18'),

  13. any one ever heard of nusoap? its a hard coded script. i was given to do a project on it and frankly speaking, i have no idea any help will be appreciated. thanks

  14. <?php

    $date = date;

    $fname=$_REQUEST['fname']; $lname=$_REQUEST['lname']; $member_num=$_REQUEST['member_num']; $amt_buy=$_REQUEST['amt_needed']; $email=$_REQUEST['email']; $phone=$_REQUEST['phone']; $address=$_REQUEST['address']; $db="mydatabase";

    $link = mysql_connect("localhost", "user", "password");

    if (! $link)

    die("Couldn't connect to MySQL");

    mysql_select_db($db , $link)

    or die("Couldn't open $db: ".mysql_error());

    mysql_query ("INSERT INTO members (fname, lname, member_num, amt_needed, email, phone, address, date_of_order) VALUES ('$fname','$lname','$egold_num', '$amt_buy', '$email','$phone', '$address', '$date')");

    mysql_close($link);

    ?>

     

    all i get is 0000-00-00 on the colum am expecting a date.

     

    thank you

  15. I NEED A SCRIPT THAT CAN HANDLE E-CURRENCY FUNDING ON THE ADMIN AREA. AND THE ACCOUNT NUMBER TO THE E-CURRUNCY HOLDER SHOULD BE HYPERLINK TO THE PAYMENT SITE. THE SITE EG ARE EGOLD, CGOLD, LIBERTY RESERVE. I SHALL BE FOREVER GREATFUL FOR THE PERSON GIVEN ME THE SCRIPT. I AM JUST A BEGINNER IN PHPMYSQL. SO THERE ARE LIMITATIONS TO THINGS I COULD DO. BUT BEFORE I GET THE KNOW HOW. I NEED THE SCRIPT.

     

    THANKS

×
×
  • 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.