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...
User Profile
Collapse
-
Using a form to search a database
-
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 =... -
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'] ?>
... -
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
...Leave a comment:
-
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...
No activity results to display
Show More
Leave a comment: