what are php tags

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
franknu
Forum Contributor
Posts: 146
Joined: Sun May 28, 2006 9:29 am

what are php tags

Post by franknu »

i been told to use php tags

i thought like <? ?> where the php tags there is any other of tags i should be aware of

here is where i been require to use tags

<?php

$username="localhost";
$password="abc123";
$database="contacts";

$db = mysql_connect("localhost", $username,$password);
mysql_select_db("contacts",$db);
$result = mysql_query("SELECT * FROM `First Name:` WHERE `Position:`",$db) or die(mysql_error());

$myvar= "Hello World";
printf("$myvar");


printf("Position: %s<br>\n", mysql_result($result,0,"Position:"));
$result= mysql_num_rows();


?>

</body>
</html>
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I was referring to the posting guidelines on this forum:

viewtopic.php?t=21171
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If you read your previous posts that moderators have edited you should notice a link to "posting code in the forums." Read it.

Here's an open link to it: viewtopic.php?t=21171
Post Reply