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
Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.I need to create a dropdown list of months, where the starting month is current month and the ending month is the previous months 2
"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the From field. I need the email that is sent to be "From" the email that the sender input.
Character increment
Hi,I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc....The container where i am displaying this is being dynamically generated using jquery.Any help?
Update Database
Hi All,I have a problem with this:Code: [Select]<?phpsession_start();include('../common/dbconnect.php');$stock_id = $_GET['stock_id'];$query='SELECT * FROM users_stocks WHERE user_id ="' .
[PHP HELP] Php order form.
Hello to everyone @ phpfreaks. Im new to this site and hope to learn lots of things here.First of all im here to ask for some help if posible. Im a newbie at php and do not know much about it. my
insert quotes
Hi,I have an output like this:Code: john,18,CancerHow can I change this to Code: 'john','18','Cancer'with php?Thanks in advanced,
Question about ShowWindow()
Hello....I'm struggling with sumpin, and I hope y'all can help.I've got a CFormView with a small web browser control (CWebBrowser2), that only needs to be displayed occasionally, when a user selects a
Problem with an browser game.
Hello,i just joined that great forum and i got php prob,its kinda freaky...anyway i got browser game,and i made an thingy to my game what shows health,energy and wallet up..and its all okay but i
Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I need to post back to a C# or VB method to handle the changed text entered into the text box control.Is
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sites?