show page html in php [closed]

-4

I am making a code in php, after this code perform its action I would like to show another page in html ex:

echo " <a href= 'main.html' > ";

there would appear the <main.html> page. But I do not know how and if not possible ... I would like a help or indication of how to do it.

    
asked by anonymous 27.08.2017 / 03:46

3 answers

1

As already mentioned, headers can not be sent after the output, so if you do not do any output, you can use this function to redirect to another page:

header('Location: main.html');
    
27.08.2017 / 03:58
0

The <a> of HTML tag is commonly used to build links: <a href="#">#

27.08.2017 / 05:36
-5

If you want to make the image appear and you are using a database ... I know how to do it ... your echo has to look like this:

$busca_query = mysql_query ("SELECT * FROM tabela WHERE colunanoBD = '$busca'");
while ($dados = mysql_fetch_array($busca_query)) {
echo "<img src='Visual/imagens/$dados[foto]' /></b><br/></a>";

In this case the Visual is folder and inside this the image folder and in the bd in the column you put the image as > foto.jpg < only this ... is the image with extension.

If you want to boot a div before <?php . You can put a style and move with margin left center or right at will through the screen.

    
27.08.2017 / 21:14