Jump to content


Photo

Problem including a template in php file


  • Please log in to reply
2 replies to this topic

#1 niza

niza
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 21 April 2006 - 10:41 PM

I have a user registration area:
new_member.php - script that executes the registration
new_member.htm - contains the html registration form
template.htm - html template

If the user does not fill in all the required fields, new_member.htm is called in new_member.php, with the appropiate error message.

Now, I have problems including my template.htm file.

1.If I include it in the new_member.htm, whenever the user does not fill in the required fileds, the error message are displayed on top of the template.
2.If I include it in the new_member.php, the form is not displayed properly.

Any ideas?

By the way, the script for user registration I am using is this: [a href=\"http://www.phpfreaks.com/tutorials/40/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/40/0.php[/a]


#2 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 21 April 2006 - 10:53 PM

[!--quoteo(post=367348:date=Apr 21 2006, 03:41 PM:name=niza)--][div class=\'quotetop\']QUOTE(niza @ Apr 21 2006, 03:41 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I have a user registration area:
new_member.php - script that executes the registration
new_member.htm - contains the html registration form
template.htm - html template

If the user does not fill in all the required fields, new_member.htm is called in new_member.php, with the appropiate error message.

Now, I have problems including my template.htm file.

1.If I include it in the new_member.htm, whenever the user does not fill in the required fileds, the error message are displayed on top of the template.
2.If I include it in the new_member.php, the form is not displayed properly.

Any ideas?

By the way, the script for user registration I am using is this: [a href=\"http://www.phpfreaks.com/tutorials/40/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/40/0.php[/a]
[/quote]

I'm a bit confused as to what you're trying to do and why, and exactly what your problem is. Needless to say.. only PHP files will be parsed by the php interpreter server side. There is no way to include html files inside other html files without some server side language, so your description in that regards doesn't make much sense. Maybe it would help if you provided some source code.


#3 niza

niza
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 21 April 2006 - 11:23 PM

Don't worry about it. I solved my problem. Thanks anyway.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users