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
Weird problem with SELECT command..Help!
Hi!It seems I'm having a really weird problem with SQL SELECT command....I have table into a mySQL DB wich as 4 entry in it. I created the select command to retrieve the data and only 3 of the 4 entry
Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in the right direction...here is my problem. I have index.php in that file i have included login.php
PHP Array quick help
I need$_SESSION{'username'} to be like this:if $_SESSION['username'] = "gayner,bob,jesus";echo "ba blah ";but do i use Arrays or what for those 3 nameS? how thanks
Email to a friend script problems
I have this send-to-a-friend script with 2 issues:1) When you open the form popup on a particular page, it includes the correct URL for that page (viewable on the popup form). But if you close it, go
upload image name with extension using php
hi frds..<input id="file1" type="file" name="file[]" >upload image show path like C:\Documents and Settings\My Documents\My Pictures\images0056.jpgi need
Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ignores any file names that begin with numbers, could anyone please tell my why and show me how to
Php - mysql select?
hi, i have this code:Code: <?phpsession_start();// dBase fileinclude "config.php";if ($_GET["op"] == "login") { if (!$_POST["username"] ||
Warning: session_start() [function.session-start]: Cann.....
hi, can someone help me with this? I keep getting this error....Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by ......I tried to upload my files
Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount of tickets and then enters their personal details... then this form does the post method and it then
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the structure of my code. I'm really new at this and still learning, but I'm almost at the stage of giving up