Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D
I'm trying to learn PHP and MySQL, and atm I am trying to make a website which corresponds with a database - a database with customers.
I managed to make the page show all the customers in the database - with first- and surname.
I want each of these customers to be clickable - when you click a customer, it shows all the information about that customer which is stored in the database.
So far I have managed to make them clickable, but I don't know how to make it so that the click posts all the associated information about that customer on the page..
I can post some of the stuff I tried out with, but I'm not good with PHP (yet! =D), and therefore I got stuck quite early... but here's some of the stuff I've done so far..
Code: <?php
// Connect to the database server
$dbcnx = @mysql_connect('localhost', 'root', 'password');
if (!$dbcnx) {
exit('<p>Unable to connect to the database server at this time.</p>');
}
// Select the database
if (!@mysql_select_db('customerdb')) {
exit('<p>Unable to locate the database at this time');
}
?>
<p>Here are all the customers:</p><br />
// Request data from the database
$customers = @mysql_query('SELECT * FROM customers');
if (!$customers) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}
while ($row = mysql_fetch_array($customers)) {
$customerID = $row['kundeID'];
$customer_forename = $row['forename'];
$customer_surname = $row['surname'];
echo '<p>' . $customer_forename .
$customer_surname .
' <a href="' . $_SERVER['PHP_SELF'] .
'?showcustomer=' . $customerID . '">' .
'customer details</a></p>';
}
?>
Thanks!
Using Curl_multi for processing multiple URLs
Hi,I am at a loss as to how to implement this. I would like to be able to automatically assign a number of urls taken from a file to x amount of curl_multi handles determined by the user on the form,
iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped by separate. I need some help.Code: <?php$arrFoodTypes =
TCP Sending Unsigned Char...
Hi...
Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different places, and is kinda hard to get, so I have written this entire code:Code:
please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row?<?phpif (!empty($avil_holidays)){ foreach ($avil_holidays as $val) { switch
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the structure of my code. I'm really new at this and still learning, but I'm almost at the stage of giving up
Text file to .Dat file Conversion in PHP
Hi All, Could anybody provide code for Text file to .Dat file Conversion in PHP. Thanks,
PHP XML extraction text
I would like to extract an xml text and have that text directly echo(print) out on my web page. Here's the xml i want to extract:http://dblp.uni-trier.de/search/author?xauthor=SchekWhat I
Convert Binary String to Decimal
Trying to Get:Decimal: 305419896Out of:Binary String: xV4
Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I want to insert:Code: <?php echo $my_twitter_username; ?>Into this code:Code: