Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:
Code: [Select] <?php
error_reporting(E_ALL);
$Host = "***";
$User = "***";
$PassWord = "****";
$DataBaseName = "***";
$TableName = "products";
mysql_connect($Host, $User, $PassWord);
mysql_select_db($DataBaseName);
if (isset($_GET['id'])) {
$id = (int)$_GET['id'];
// $select = "SELECT id FROM" . $TableName;
if ($id > 0) {
$select = "select description from" . $TableName . "WHERE id = " . $id;
$result = mysql_query($select);
echo $result;
echo $id;
}
else {
echo "id not > 0";
}
}
else {
echo "ID not set;
}
?>
<p><a href="proba.php?id=1" name="id=1"> Find out more about it. </a></p>
<a href="proba.php?id=2" name="id=2"> Find out more about it. </a></p>
<a href="proba.php?id=3" name="id=3"> Find out more about it. </a></p>
That's a testing page only. What happens here is that only the ID is displayed.
The funny thing is when i add this code to the original page, my apache gives errors on the localhost and i get Quote Premature end of script headers. Obviously I'm doing something wrong, but I don't know what it is. oh, when i run this code on the original page but remove the password, apache is not shoting..
present value of sequence?
Hi
BI in Upstream Production operations
Appreciate if you can assist in the following areas:
using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the button and it puts the name into the database and into a list on my page. it works fine. Now, I wanted to
How many users online in the last 24-hours using time()?
I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in time() format.I need a query that'll check how many players have logged in within the last
Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make it so that people that are a certain rank in my game will have their names show up bold in the users
Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since columns have there already set collation....
Help: calling function
Hi,Is it possible to call a php function on page close?If yes, could you explain how and where to call?any example code will be appreciated.Thanks
Check before inserting in DB ???
This is my code--------------- if ( $_POST ['Submit']){{$username = $_POST ['usernm'];$userpassword = $_POST ['userpw'];}/*insert data from the form into the db table*/ $querypost = mysql_query
PHP Captcha Error help - replace the "die" command
Hi All,I am after a bit of help with a Captcha spam protection box.The site gave me instructions, and all is well, apart from if the user give the wrong Captcha information...The highlighted code is
noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),a using this codeCode: <?php$contact_name = $_POST['emp'];$contact_email =