Jump to content


Photo

HTML within PHP


  • Please log in to reply
4 replies to this topic

#1 treilad

treilad
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 15 July 2006 - 02:08 AM

Simple question with a simple answer, I'm sure.

This is my code:
<?php

include ('db.php');

if(isset($_COOKIE['ID_my_site']))
{
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{

if ($pass != $info['password'])
{ header("Location: loginpage.php");
}

else
{
header("Location: links.php");
}
}
}
else

{
header("Location: loginpage.php");
}
?>

This:

header("Location: links.php");


I would like to change to have the effect of this:

<meta http-equiv="refresh" content="5;url=http://stuff.com/stuff">


I just simply don't know how to embed the HTML within the PHP.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 15 July 2006 - 02:30 AM

OK, I'm confused.  What 'effect' do you want?  And why?
Legend has it that reading the manual never killed anyone.
My site

#3 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 15 July 2006 - 02:41 AM

Why can't you make it a php page and do this:
<?php
echo '<meta http-equiv="refresh" content="5;url=link.php">';
?>

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#4 treilad

treilad
  • Members
  • PipPipPip
  • Advanced Member
  • 58 posts

Posted 15 July 2006 - 02:52 AM

It already is a PHP page, but yes, that worked. I echoed it and it works fine now. Thanks. :)

#5 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 15 July 2006 - 03:13 AM

Lol, you're funny.

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users