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
Posting to another Site?
I have software that people install.When they install it, is there a way to make it post their domain name to my website?I know I could do a header('location: http//www.mysite.com/id=?domain.com');
please help
HTML Code:Code: <span id="ctl00"><span> <div class="ldpPropFeatures"> <div
Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Message, then I would store the data in a DB and show them.I have already made the code for this. In
I need help with formatting date from mysql! with php!
Hello guys*Note: this is a php question not MySQL question, please do not move it to mysql section! Thank you.anyway, I have a record from the database as 2009-12-31 23:59:59I needed to when ever I
textfield unchanged
hi,i want my form to know whether its textbox is unchange or not.if($textbox == 'unchanged'){ //do this}else{ //do this}ive been searching all day , but cant find the exact solutions...
How can i steam a video on my PHP site? (non YouTube)
Basically I have a PHP site and don't want to give page rank to YouTube. I just want to stream a basic video. If you know of any methods, please list file types those methods allow, the more the
Shuffle between users ??
I have multiple $users in table. I need to send them $message.I need to send the next message available in the database to the next user who got least amount of messages.Or how could I place those
explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searches for the second word. For example: if I typed london zoo , it will only search for zoo.Is this
Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrasehere_10.php, somephrasehere_11.php, etc. On each of these pages, I want to include a common code
Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would like to add some meta to the website but the index file is just a bunch of classes and includes so