Hello,
I am having trouble as i am new to php. I have connected to the database and I have displayed the fields i want on my page. I need to access certain fields by links to each letter.
For example A will link to the products starting with A and so on.
I am using PHP ad MySQL. The database is however on a different server. I only have the .php file at the moment and want to display the data on a HTML page.
I am just unsure of how to make a link to the product field and the price field and display them within a table.
My code is this so far..
<?php
// Connect to the database server
mysql_connect("host", "username", "psssword") or die(mysql_error());
// Open to the database
mysql_select_db("telephon_cscartrestore") or die(mysql_error());
//select records from table
$result = mysql_query("SELECT cscart_product_descriptions.product, cscart_product_prices.price FROM cscart_product_descriptions, cscart_product_prices ORDER BY cscart_product_descriptions.product ASC") or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Product</th> <th>Price</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['product'];
echo "</td><td>";
echo $row['price'];
echo "</td></tr>";
}
echo "</table>";
?>
I want a link 'A' that opens all records starting in A and so on. Is this possible?
thanks
how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a sessionCode: <?phpinclude_once 'Connect.php';if (!is_authed()) { die ('You are not
Upload file and add HTML
Hey everyone,I have a client has meeting agendas and minutes that should be posted online. I could teach someone how to FTP it onto the site, but I thought PHP would allow for a cooler solution. Here
batch file not building to webapps folder
Hello. I just started running Vista :P and can't seem to get my projects deployed. I found out how to run the .bat file, but my project isn't in the Apache webapps folder. I'm getting an error in
what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %s\r\n", $name);what does %s means ?
Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at one specified directory and makes <img src="*.*" \> type links out of it?ive
md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm pressed for time. I have searched google, php.net, etc. But it only tells me how to make md5 hashes. Ok
Multi dimensional arrays
If I put in this code:
array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 pt grading scale)
PHP form authentication
Hi guys,what am trying to achieve is this: Whenever a user tries to login to my website, an error should be displayed for the first time notifying them to try again. Every time they open the website,
form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how do i do this?Code: <?php echo "<form enctype='multipart/form-data'