Jump to content

Archived

This topic is now archived and is closed to further replies.

treilad

HTML within PHP

Recommended Posts

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

This is my code:
[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");
}
?>[/code]

This:
[quote]header("Location: links.php");[/quote]

I would like to change to have the effect of this:
[quote]<meta http-equiv="refresh" content="5;url=http://stuff.com/stuff">[/quote]

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

Share this post


Link to post
Share on other sites
OK, I'm confused.  What 'effect' do you want?  And why?

Share this post


Link to post
Share on other sites
Why can't you make it a php page and do this:
[code]
<?php
echo '<meta http-equiv="refresh" content="5;url=link.php">';
?>[/code]

Share this post


Link to post
Share on other sites
It already is a PHP page, but yes, that worked. I echoed it and it works fine now. Thanks. :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.