Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1234 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

php question

Thread title: php question
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
08-04-2006, 05:51 AM
#1
ZachCarter is offline ZachCarter
ZachCarter's Avatar
Status: Member
Join date: Apr 2006
Location:
Expertise:
Software:
 
Posts: 146
iTrader: 1 / 100%
 

ZachCarter is on a distinguished road

  Old  php question

how would you add a php script into a html document

the script is just a <?
/?>

when i add it the php just shows up in regular text

sorry i'm kinda noobish at coding

thanks - Zach

08-04-2006, 05:58 AM
#2
Garyrae is offline Garyrae
Status: Request a custom title
Join date: Dec 2005
Location: Colchester, UK
Expertise:
Software:
 
Posts: 4,625
iTrader: 16 / 100%
 

Garyrae is on a distinguished road

Send a message via MSN to Garyrae Send a message via Skype™ to Garyrae

  Old

PHP Code:
<?

Some code here

?>

08-04-2006, 11:28 AM
#3
Jeff Andersen is offline Jeff Andersen
Status: Superstar
Join date: Apr 2005
Location:
Expertise:
Software:
 
Posts: 4,449
iTrader: 10 / 100%
 

Jeff Andersen is on a distinguished road

  Old

Well, when using php outside of a .php document i recommend using full opening tags.

PHP Code:
<?php

?>

08-04-2006, 01:04 PM
#4
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

It really doesn't matter if you use short code or long code. I have never seen a host that did not support short hand.

08-04-2006, 03:08 PM
#5
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

for compatibility reasons, I always use the tags no matter what type


Originally Posted by Jeff Andersen
Well, when using php outside of a .php document i recommend using full opening tags.

PHP Code:
<?php

?>

08-04-2006, 04:54 PM
#6
Andrew R is offline Andrew R
Status: Request a custom title
Join date: Dec 2005
Location: Arizona
Expertise:
Software:
 
Posts: 5,200
iTrader: 17 / 95%
 

Andrew R is on a distinguished road

  Old

Originally Posted by LeetPCUser
It really doesn't matter if you use short code or long code. I have never seen a host that did not support short hand.
It's better to use long tags. There was an arguement in another thread about which is better.. which I won of course. :P

08-04-2006, 08:41 PM
#7
ZachCarter is offline ZachCarter
ZachCarter's Avatar
Status: Member
Join date: Apr 2006
Location:
Expertise:
Software:
 
Posts: 146
iTrader: 1 / 100%
 

ZachCarter is on a distinguished road

  Old

ok i was using <?

Some code here

?> and it wasn't working i'll add php

08-04-2006, 09:18 PM
#8
Spawny is offline Spawny
Spawny's Avatar
Status: Request a custom title
Join date: Aug 2005
Location: Great Yarmouth, England
Expertise:
Software:
 
Posts: 1,321
iTrader: 2 / 100%
 

Spawny is on a distinguished road

Send a message via AIM to Spawny Send a message via MSN to Spawny

  Old

You need to make sure the ending of the page is .php (for example, index.php). I'm new to PHP as well, but i think that will solve it.

If it doesn't, you know not to listen to me ever again.

08-05-2006, 05:15 AM
#9
StatisticZ is offline StatisticZ
Status: Junior Member
Join date: Jul 2006
Location:
Expertise:
Software:
 
Posts: 81
iTrader: 0 / 0%
 

StatisticZ is on a distinguished road

  Old

Originally Posted by Jeff Andersen
Well, when using php outside of a .php document i recommend using full opening tags.

PHP Code:
<?php

?>
Try what he said. that normally works for me without naming it .php

08-05-2006, 09:15 PM
#10
LeetPCUser is offline LeetPCUser
LeetPCUser's Avatar
Status: Member
Join date: Aug 2006
Location: Wisconsin
Expertise:
Software:
 
Posts: 132
iTrader: 0 / 0%
 

LeetPCUser is on a distinguished road

Send a message via AIM to LeetPCUser Send a message via MSN to LeetPCUser Send a message via Yahoo to LeetPCUser

  Old

Also, if your host (especially if it is free) doesn't support PHP then it will never work.

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed