User Profile

Collapse

Profile Sidebar

Collapse
Cowbie
Cowbie
Last Activity: Nov 21 '07, 03:33 PM
Joined: Nov 5 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Cowbie
    started a topic Using a form to search a database
    in PHP

    Using a form to search a database

    Hello again everyone. I sorted out my problem with tables by re-jigging the code around a little bit. However, I still have one question for now. I want to be able to search my database using a php page. So, I want to search for something between two dates (fromDate) and (toDate). So far, I have the user enter in the details into a form on one page, when they click submit I want it to show their search results.

    The response page as...
    See more | Go to post
    Last edited by Atli; Nov 21 '07, 10:38 PM. Reason: Added [code] tags.

  • Cowbie
    started a topic Tables from MySQL query results
    in PHP

    Tables from MySQL query results

    Hello again,

    I'm using a MySQL database and I want to pull results from the database and put them onto a php page. I've currently got it working using the following code, but it's not exactly what I want:

    $query = 'SELECT * FROM loan';
    $result = mysql_query($qu ery) or die('No Loans Found: ' . mysql_error());

    // Printing results in HTML
    echo "<table>";
    while ($line =...
    See more | Go to post

  • Cowbie
    replied to Simple calculations in PHP
    in PHP
    Ok, that helps me a great deal, thanks!
    However, I thought it would have taken the values from the ones shown in the table - for example $_POST['chassis']

    How can I fix this, or assign them the values given in the table?


    EDIT:
    Ok, I think I have it figured thanks to your post. I did:

    <?php $chassis = $_POST['chassis'] ?>
    <?php $bhp = $_POST['bhp'] ?>
    ...
    See more | Go to post

    Leave a comment:


  • Cowbie
    replied to Simple calculations in PHP
    in PHP
    Thanks for those links. I think I didn't quite explain myself properly in my original post. The problem I *think* I'm having is the code I've written:

    <?php $speed = $chassis + $bhp;?>
    <?php echo number_format($ speed); ?>

    It always seems to return 0 rather than any other number. Why is this? Can anyone tinker with my code or hand me some pointers?
    You can look at the actual website here
    ...
    See more | Go to post

    Leave a comment:


  • Cowbie
    started a topic Simple calculations in PHP
    in PHP

    Simple calculations in PHP

    Hello everyone,

    I'm very new to PHP and I'm keen to learn how it all works. I've been looking for help all day and reading tutorials etc which is how I came accross this forum - so here's hoping for some answers :)

    First off I'll tell you what I'm doing. I'm making a calculator of some form which will do some simple calculations on the numbers entered into a form. For example, adding, multiplying etc. At the moment just...
    See more | Go to post
    Last edited by Atli; Nov 5 '07, 09:11 PM. Reason: Added [code] tags.
No activity results to display
Show More
Working...