alco19357
-
Posts
55 -
Joined
-
Last visited
Never
Posts posted by alco19357
-
-
yes or to save constants you can do an array
$databaseInfo = array( "host" => "localhost", "user" => "myuser", "pass" => "password", "db" => "database", "pconn" => false, "store_sess" => "" );
Then add an include 'config.php'; to each page and just use this where needed
$databaseInfo["host"], etc.
-
That's why you're updating your MySQL database, that's the convenience!
-
<?php $sql = "SELECT foo FROM bar"; $result = mysql_query($sql); // check your call to mysql_query succeeded. if ($result) { // check $result holds data if (mysql_num_rows($result)) { // in here it is safe to use $result to display data while ($row = mysql_fetch_assoc($result) { echo $row['foo'] . "<br />"; } } else { // no data found. } } else { // query failed, handle error. } ?>
$sql = "Select * from links where user_id = 'Addidas'"; $records = mysql_query($sql); $records_count = mysql_num_rows($records); if($records_count > 0){ //do functions }else{ //parse error }
For this you can check if there is a specific number of returns for instance if($records_count === 1){ and so on
-
Using php will allow you to dynamically edit your template. use phtml files
add and multiply results of a form
in PHP Coding Help
Posted
HTML FORM
php
How bout something like that?