I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code executes fine but the html tags in my script are treated as text and displayed on the page.
This is myscript:
<?php
print “Opening the connection to the database server< br />â€;
$link = mysql_connect("localhost", "root", "password");
print " Selecting a database< br />" ;
$result = mysql_select_db( "databasename" ) ;
if ( $result )
{
print " Database selected successfully< br />";
}
else
{
print " There was a problem with the database
selection< br />" ;
}
?>
This is the output:
Opening the connection to the database server< br /> Selecting a database< br /> Database selected successfully< br />
Why are the html tags being displayed in the output?
I'm using:
php 5.3.1
apache 2.2.12
mysql 5.0.88
on fedora 10.
Any help would be much appreciated.
Thanks
Vertical Alligning - Not working in 1 cell?
<?phpecho "<table id=\"valign\" width=\"60%\" style=\"border:1px solid #EEE;\">";echo "<tr><td
foreach help.
Hello all,First time I'm attempting to use a foreach statement and was just wondering if my code is correct:Code: $sql = "SELECT email from mail_list where subcribed = \"Y\" ";
controlling/creating accounts with privileges
hi all,i'm trying to figure out how i can create/control account with privileges, for instance an Administrator creates an account but gives it guest privileges (able to see data but not edit, or
upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as you can see from my code below it limits only gif and php fileshow do i edit my code to limit all
Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.
timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)in my mysql db using the time()and when i show the time on webpages i use the date('ymd/h:i:s', $time) kind of thing.now
MySQL Primary key gap
Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (http://zeroerror.co.uk/community_img.php) which is working fine, technically, but I have a slight
getting Vars to pass to next page.
Hello all, I have a confusing situation on my hands, i am a member of a gaming community and we are setting up a website (yay i get to be teh techie!!) im not exactly a noob with php but i am by far
Contents of variable not echoing
Hey guys, hopefully this is an easy one...In this line, the variables are not echoing out. The script runs without error though.Code: [Select]echo "Name: $name | E-mail: $email | Comments:
Big Problem!! Please help
Hi Guys,Im making a website for a friend have encountered a really annoying problem. When every i run the script below i get this error: "Parse error: syntax error, unexpected '}' in