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
Insert Failing.
Hey,I am making a Sign up page for a website, but the insert query into the Database does not seem to work, it returns no errors, just simply does not work.Code: $insert_user =
validating url
im trying to validate url's sent to me by a formthe url's im collecting are for placing banners on my site so the url's are the link to there site and url of where there banner isURL's ARE BROKEN INTO
add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it after atleast 20 000 but i dont wana loose the count this is how i get the count now how do i add 20
Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont really care if it is a Drop Frame or Non Drop Frame system, it doesnt need to be that accurate. Just
Simple AND question
Hello,I've got following code:Code: if(strpos($row[13],"http://")!==false) $info['results'][$num]['player']="PREVIEW"; else
Need understanding of this bit of code
Code: <?php // WHERE clause filters $arrSQLFilters = array(); // whether or not zip codes table needs to be included $boolIncludeZipCodes = false; // Zipcode filter
Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in functions, since it's kind of confusing. I just made these functions: <?php function
Convert Binary String to Decimal
Trying to Get:Decimal: 305419896Out of:Binary String: xV4
PHP arrays into arrays need help
HelloI am trying to highlight the days on my calendar based on the dates that i have in my database. Currently I can only get it to display the last element in the database which leads me to believe
utf8_general_ci error ??
I have all kinds of data to be inserted in database table//I am getting this errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right