Jump to content

jeeves245

Members
  • Posts

    145
  • Joined

  • Last visited

Posts posted by jeeves245

  1. Name text No

    Email text No

    Phone text No

    Address text No

    ForumUsername text No

    Paid text Yes NULL

    Dispatched text Yes NULL

    MembershipNumber int(6) Yes NULL

    Expire date Yes NULL

  2. Yeah I already tried that.. Didn't change anything.

    Of course not... did you update all of the existing values?

     

    Yes. When I hit submit, the 0000-00-00 values just come right back :-\

  3. Hey all,

     

    Is anyone here familiar with phpBB? I have a bit of a problem.

     

    Basically I run a car club that consists of a forum and a seperate paid membership with added benefits. To sign up for the paid membership, users fill in a form with their details, make the payment, and the membership is good for a year. However in a few months my club has its 1st birthday so I need to figure out a renewal system.

     

    So what I need to do is let users view their membership details, change them if they are incorrect, then hit submit to renew their membership. That's all easy enough to do. The problem I have is authenticating users so they can only view their own data from the database.

     

    I have thought about tapping into the phpBB cookies but i've looked at them and they're WAY beyond me, i'm only a beginner programmer.

     

    Could anyone suggest another way I could tackle this problem?

     

    Thanks in advance.

  4. Hey all,

     

    Is anyone here familiar with phpBB? I have a bit of a problem.

     

    Basically I run a car club that consists of a forum and a seperate paid membership with added benefits. To sign up for the paid membership, users fill in a form with their details, make the payment, and the membership is good for a year. However in a few months my club has its 1st birthday so I need to figure out a renewal system.

     

    So what I need to do is let users view their membership details, change them if they are incorrect, then hit submit to renew their membership. That's all easy enough to do. The problem I have is authenticating users so they can only view their own data from the database.

     

    I have thought about tapping into the phpBB cookies but i've looked at them and they're WAY beyond me, i'm only a beginner programmer.

     

    Could anyone suggest another way I could tackle this problem?

     

    Thanks in advance.

  5. Another quick question :)

     

    I have a set up a basic database management system for my website where I can update database entires via a form. A few of my fields for each row do not require data (i.e. the membership expiry date is blank for a member who has not yet paid.)

    When I edit a row (that has blank fields) and submit the changes the fields such as the date have been replaced with "0000-00-00".

     

    Is there any way I can stop this from happening? I need blank fields to be left blank, other wise my "WHERE ExpiryDate<CURRENT_DATE" condition gets messed up.

     

    Cheers for any info.

  6. You need to add/delete columns, not rows .. is that's why it's not making sense?  Columns describe the format of the data, rows are actual pieces of data.

     

    Oh, yeah i'm aware of that. I tried writing a query to move the data over but I can't get it to work  :-X My SQL knowledge is limited.

     

    So I was just trying to find an option in phpMyAdmin to do it. There seems to be options for everything BUT that  :-[

  7. Hi all,

     

    I'm hoping someone will be able to help me with this. I'm using MySQL via phpMyAdmin.

     

    At the moment I am using the following table for a resonably small database (which only contains one table):

     

    ForumUsername

    Email

    Phone

    Address

    Paid

    Dispatched

     

    However the table no longer suits my needs, and I can't figure out how to add/delete rows, so I am creating a new table to replace the old one. It will look like this:

     

    ForumUsername

    Email

    Address

    Paid

    Dispatched

    MembershipNumber

    Expires

     

    Could anyone tell me how I can create a query to put the information from the first table (from ForumUsername, Email, and Address) into the new table?

     

    Any help much appreciated.

     

    Cheers.

     

  8. Hi all,

     

    I know this is a big ask - but i'm new to all this and I was just wondering if someone could point me in the right direction?

     

    It's hard to explain what I want to do - but i'll try.

     

    Basically i'm building a catalog. I retrieve all of the information from my Oracle database, including the picture path. As you can see, the code is in a loop, so it just loops from the first entry to the last and puts all the data in a table. When I click on the picture for any given product, it takes me to the product details page based on the books ISBN number. I.e. 'ISBN_NUMBER.html'.

     

    This is where i'm stuck. Once I get to the product details page, I need to write a 'SELECT where' statement based on the ISBN number that I just clicked on. So what I need to somehow do is get the ISBN number either from the previous page or from the URL and then insert it in the 'SELECT where' statement so it brings up all of the information about that product.

     

    Does that make sense?

     

    Here's the current code for the catalog page: I have put ****'s beside the line in question.

     

      <?php
        $db_conn = oci_connect("bookfair", "books", "//127.0.0.1/XE");
    
        $cmdstr = "select BK_TITLE, BK_PRICE, BK_PHOTO, BK_ISBN from BOOKS";
    
        $parsed = ociparse($db_conn, $cmdstr);
        ociexecute($parsed);
    
        $nrows = ocifetchstatement($parsed, $results);
    
        echo "<table border=1 cellspacing='0' width='80%'>\n<tr>\n";
        echo "<td><font color=white><b>Title -</b></td>\n<td><font color=white><b>Price-</b></td>\n<td><font color=white><b>Photo -</b></td>\n</tr>\n";
    
        for ($i = 0; $i < $nrows; $i++ )
        {
          echo "<tr>\n"; 
          echo "<td><input type=checkbox name=product> <font color=white>" . $results["BK_TITLE"][$i] . "</td>";
          echo "<td><font color=white>$ " . number_format($results["BK_PRICE"][$i],   2). "</td>";
          *****echo "<td><a href=/details/" . $results["BK_ISBN"][$i] . "><img src=" . $results["BK_PHOTO"][$i] . "></td>";*****
          echo "</tr>\n";
        }
    
      ?>

     

    Any help much appreciated....

  9. Ah, that makes sense! I wasn't expecting anyone to write the whole thing for me, but thank you! That's fantastic!  :D

     

    It works perfectly ;)

     

    How would I change it so it only outputs select fields from each record? I.e. if it has 'name' 'phone' and 'email', I only want it to return 'name' and 'phone'? I assume I wouldn't use an array in this case? Or can I use a conditional array? And is there a way to place the returned data into variables then display them in text boxes?

  10. Hi all,

     

    i'm new to PHP and SQL, and i've been having some trouble writing a script. A friend told me this is the place to ask, so here I am!

     

    Basically I have a form where a user enters their username. After they click submit I want the next page to display their records from the database BASED ON the username they entered. I also want them to be able to submit the form back to update their info, but that can come after I get the first part sorted out.

     

    Now don't laugh at my crappy coding! :P As I said, i'm new to this, and any tips or nudges in the right direction would really be appreciated!

     

    Here's what I have so far -

     

    <html>
    <body>
    	<form action="username.php" method="post" name="UsernameSearchForm">
    		Username: <input type"text" name"ForumUsername">
    				  <INPUT type="submit" name="Update" value="Update">
    	</form>
    </body>
    </html>

     

    <?php
    
    $db = mysql_connect("localhost", "*******", "*******");
    @mysql_select_db("FBI_Order",$db);
    
    $ForumUSername=$_GET['ForumUsername'];
    
    $query = ("SELECT * FROM FBI_Applications WHERE $ForumUsername='ForumUsername'");
    mysql_query($query);
    
    
    $ForumUsername=('ForumUsername');
    $Name=('Name');
    
    echo "$ForumUsername";
    echo "$Name";
    
    mysql_close();
    
    ?>

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