0

Hellow everybodi...

I succed to finish my first web site on local machine and i bought a host services and a domain name. After uploading files and mysql database I have only a huge blank page on index ....something it not wright....
Please help ....

4
Contributors
28
Replies
29
Views
6 Years
Discussion Span
Last Post by cristi08
0

Did you change data base settings ?

What did you used for php tags: whether it is <? ?> or <?php ?> .
For this <? ?> , we need to enable short tags in your server.

Is your website is having index.php or not?

Where did you uploaded your code (any sub folder)?

check for these basic validations.

0

I used <?php ?> , I have index.php, but output it blank page, I did not change my databse settings so this may be the problem...what I should change?

0

give your live database settings (where your database is located):
host,db username,db password,dbname.
give these correct details in the page where you have written connecting data base code.

Edited by Shanti C: n/a

0

I change the conection constants from the includes folder but I am not sure what to change at db_server...it still localhost...should I put the domain name the ip host ...or what? it an shared ip

0

These hosting people are not able to asist me. It a simple question that thei dont want to answer me. On phpmyadmin sais localhost . AT db_server should Y put localhost or the ip?
Sorry for this newbie ask but I am so fuzzy

0

Most servers place index.html above index.php so if you've made your home page as index.php and the host automatically puts an index.html page up, then it'll be displaying index.html. Have a look on your host and see if there is an index.html file and if so, delete it so that index.php is the one that gets called upon.

0

if the mysql server is on the same machine as your php code than localhost will most likely be your database server. If the mysql server is on a remote machine, you will need to use an ip or hostname and probably a port to connect.

In *most* hosting environments it will be localhost

0

Thank you man. The index.html was deleted still not working and I do not know if it realli from the database connection cause I change the script and no change even much more ...do you want to see the index.php code? Any ideas?

0
]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php session_start(); ?>
<?php /* include("includes/connection.php");?>
<html>
<title>PRIMA PAGINA</title>

<body>

    <div id="logo">
    </div>
    <div id="top">
	<fieldset id="search">
	   <legend id="search">CAUTARE RAPIDA</legend> 
    <form name="search" method="post" action="search.php"/>
    <input id="denumire_produs" type="text" name="denumire_produs"  />
  <p class="submit"><input type="image" src="images2/sageata.png" name="search" alt="submit" /></p>
    
    </form>
		</fieldset>
    </div>
  
    <div id="nav">
	<script src="Navigation/automenu.js">
</script>

<script src="automenu.js">
</script>
</head>


<link rel='stylesheet' type='text/css' href='../css/styles.css' />
<body onLoad="menu_main('s1')">

<div id="s1">
<ul>
  <li><a href="Index.php">Produse alimentare</a></li>
    
      <ul>
        <li><a href="Navigation/Produse_de_baza.php">Produse de baza</a>
          <ul>
          <li><a href="Navigation/Ulei.php">Ulei</a></li>
          <li><a href="Navigation/Zahar.php">Zahar</a></li>
          <li><a href="Navigation/Faina.php">Faina</a></li>
      </ul>
      </li>
        
          <li><a href="Navigation/Dulciuri.php">Dulciuri</a>
        <ul>
          <li><a href="Navigation/Bomboane.php">Bomboane</a></li>
          <li><a href="Navigation/Biscuiti.php">Biscuiti</a></li>
          <li><a href="Navigation/Ciocolata.php">Ciocoalata</a></li>
          <li><a href="Navigation/Napolitane.php">Napolitane</a></li>
      </ul>
      </li>
           
           <li><a href="Navigation/Paste_fainoase.php">Paste fainoase</a>
      <ul></li>
      </ul>
      </li>
        <li><a href="Navigation/Carne.php">Carne</a>
      <ul>
        <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
         <li><a href="Navigation/Legume.php">Legume</a>
      <ul>
         <li><a href="Navigation/Proaspete.php">Proaspete</a></li>
         <li><a href="Navigation/Congelate.php">Congelate</a></li>
      </ul>
      </li>
         
      <li><a href="Navigation/Fructe.php">Fructe</a>
      <ul>
      </ul>
      </li>
      
      <li><a href="Navigation/Mezeluri.php">Mezeluri</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Lactate.php">Lactate</a>
        <ul>
          <li><a href="Navigation/Lapte_dulce.php">Lapte dulce</a></li>
          <li><a href="Navigation/Unt.php">Unt</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Branzeturi.php">Branzeturi</a>
        <ul>
          <li><a href="Navigation/Topita.php">Topita</a></li>
          <li><a href="Navigation/Telemea.php">Telemea</a></li>
          <li><a href="Navigation/Cascaval.php">Cascaval</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Sosuri.php">Sosuri</a>
        <ul>
          <li><a href="Navigation/Maioneza.php">Maioneza</a></li>
          <li><a href="Navigation/Chetchup.php">Chetchup</a></li>
          <li><a href="Navigation/Mustar.php">Mustar</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Cafea.php">Cafea</a>
        <ul>
          <li><a href="Navigation/Topita.php">Decofeinizata</a></li>
          <li><a href="Navigation/Telemea.php">Cofeina</a></li>
          <li><a href="Navigation/Cascaval.php">Instant</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Conserve.php">Conserve</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
          <li><a href="Navigation/Legume.php">Legume</a></li>
          <li><a href="Navigation/Fructe.php">Fructe</a></li>
          <li><a href="Navigation/Fructe.php">Altele</a></li>
      </ul>
      </li>
       <li><a href="Navigation/Tutun.php">Tutun</a></li>
      
      <li><a href="Navigation/Bauturi.php">Bauturi</a></li>
       <li><a href="Navigation/Bauturi_Alcoolice.php">Bauturi Alcoolice</a>
         <ul>   
          <li><a href="Navigation/Bere.php">Bere</a></li>
          <li><a href="Navigation/Vin.php">Vin</a></li>
          <li><a href="Navigation/Spirtoase.php">Spirtoase</a></li>
      </ul>
      </li>
          
          <li><a href="Navigation/Bauturi_Nealcoolice.php">Bauturi Nealcoolice</a>
         <ul>   
          <li><a href="Navigation/Ape.php">Ape</a>
        <ul>
          <li><a href="Navigation/Ape_minerale.php">Ape minerale</a>
          <li><a href="Navigation/Ape_plate.php">Ape plate</a></li>
        </ul>
         </li>  
          <li><a href="Navigation/Sucuri.php">Sucuri</a>
        <ul>
          <li><a href="Navigation/Sucuri_acidulate.php">Sucuri acidulate</a></li>
          <li><a href="Navigation/Sucuri_neacidulate.php">Sucuri neacidulate</a></li>
        </ul>
    </div>
<div id="footer">
</div>
    </div>
    <div id="comunicare">
	<?php
if (isset($_SESSION['logged']) && $_SESSION['logged'] == 1) {
// user is logged in
?>
<?php

$query = "SELECT * FROM site_user,site_user_info
        WHERE
        site_user.user_id=site_user_info.user_id and
        username= '" . mysql_real_escape_string($_SESSION['username']) . "'
       " ;
         
        $result = mysql_query($query)
        or die(mysql_error);
   
    while ($row=mysql_fetch_array($result)){
       $_SESSION['username']=$row['username'];
       $_SESSION['user_id']=$row['user_id'];
       
       }?>
       

<p class="legaturi">Iti multumim pentru inscriere,
<?php echo $_SESSION['username'];?>.</p>
<p class="legaturi">Acum poti <a href="user_personal.php">apasa aici</a> daca
doresti sa intri in contul tau personal unde poti solicta livrari
speciale si multe alte lucruri.</p>


<?php
if ($_SESSION['admin_level'] > 0) {
echo '<p class="legaturi"><a href="admin_area.php" > apasa aici </a>sa accesezi ' .
'uneltele administratorului. </p>';

}
} else {
// user is not logged in
?>

  
<p>In acest moment nu esti conectat.Odata inregistrat vei avea
acces la contul tau personal unde vei gasii si alte informatii
folositoare</p>
<p class="legaturi"> Daca esti inregistrat,<a href="login.php">apasa aici
</a>pentru conectare.Daca doresti sa-ti creezi un cont,
 <a  href="register.php">apasa aici</a> pentru crearea contului tau.</p>


<?php
//Navigaton
}
?>

<p class="legaturi"><a href='vizualizare_cos.php'>Verifica cosul</a></p>

    </div>
    </div>
    <div id="content">

  
	
	<?php
	//selecteaza produsele ce vor fi programate pt livrare
  $query="select*from produse";
	
	  $result = mysql_query($query)
        or die (mysql_error);
        
        $rows = mysql_num_rows($result);
    
         while($row=mysql_fetch_array($result)){
          $id_produs=$row['id_produs'];
          $Denumire_produs=$row['Denumire_produs'];
	  $Pret=$row['Pret'];
         echo '<div id="box"><img src="images/' . $id_produs .'.png" alt="' .
		    $Denumire_produs .'"/></a>'
	   
	   ."<p>". '<a href="detalii.php?id_produs='. $id_produs .'">'
	   .$Denumire_produs . '</p><p>'.'<a href="detalii.php?' .'id_produs=' . $id_produs . '">
	' . $Pret .'  '.' RON</a></p>';
         
         ?><fieldset id="cantitate">
         <form action="detalii.php"  method="post">
Cantitate: <input type="text" name="cantitate[]" value=" " size="1"/>
	   <input type="hidden" name="Denumire_produs[]" value="<?php echo $row['Denumire_produs'];?>"/>
           <input type="hidden" name="id_produs[]" value="<?php echo $row['id_produs'];?>"/>
           <input type="hidden" name="Pret[]" value="<?php echo $row['Pret'];?>"/></fieldset></div>




 <?php ;} ?>
	     
  
<input type="submit" value="cumpar"></form>


    </div>
    <div id="rightnav">
	<fieldset id="form">
<legend>Scrieti-ne aici.</legend>

    <form id="textform" action="index.php" method="post"/>



E-mail:<br/><input  type="text" name="email" /><br/>
Telefon:<br/><input  type="text" name="telefon" />
<textarea> name=cerere rows=4  cols=18 </textarea>

<input id="submit" type="submit" name="submit" value="cerere"/>
</form>  
</fieldset>
  
   	<?php
if(isset($_POST["email"])){$email=$_POST["email"];}
if(!empty($_POST["telefon"])){$telefon=$_POST["telefon"];}
if(isset($_POST["cerere"])){$cerere=$_POST["cerere"];

	$queryi="Insert into cereri
		(email,
		telefon,
		cerere
		)values(
		    '". $email ."',
		    '". $telefon ."',
		    '". $cerere ."')";
	//comunica eroarea trimisa de mysql	
	 if(isset($queryi) && !empty($queryi)) {  
        echo"<!--" . $queryi. "-->";
        $resulti = mysql_query($queryi)
        or die ("invalid query 4: " . mysql_error ());}
		
		echo "Cererea dvs a fost inregistrata cu nr". " ". mysql_insert_id();
		}
    ?>
    </div>
    
    
</body>
</html>

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php session_start(); ?>
<?php /* include("includes/connection.php");?>
<html>
<title>PRIMA PAGINA</title>

<body>

    <div id="logo">
    </div>
    <div id="top">
	<fieldset id="search">
	   <legend id="search">CAUTARE RAPIDA</legend> 
    <form name="search" method="post" action="search.php"/>
    <input id="denumire_produs" type="text" name="denumire_produs"  />
  <p class="submit"><input type="image" src="images2/sageata.png" name="search" alt="submit" /></p>
    
    </form>
		</fieldset>
    </div>
  
    <div id="nav">
	<script src="Navigation/automenu.js">
</script>

<script src="automenu.js">
</script>
</head>


<link rel='stylesheet' type='text/css' href='../css/styles.css' />
<body onLoad="menu_main('s1')">

<div id="s1">
<ul>
  <li><a href="Index.php">Produse alimentare</a></li>
    
      <ul>
        <li><a href="Navigation/Produse_de_baza.php">Produse de baza</a>
          <ul>
          <li><a href="Navigation/Ulei.php">Ulei</a></li>
          <li><a href="Navigation/Zahar.php">Zahar</a></li>
          <li><a href="Navigation/Faina.php">Faina</a></li>
      </ul>
      </li>
        
          <li><a href="Navigation/Dulciuri.php">Dulciuri</a>
        <ul>
          <li><a href="Navigation/Bomboane.php">Bomboane</a></li>
          <li><a href="Navigation/Biscuiti.php">Biscuiti</a></li>
          <li><a href="Navigation/Ciocolata.php">Ciocoalata</a></li>
          <li><a href="Navigation/Napolitane.php">Napolitane</a></li>
      </ul>
      </li>
           
           <li><a href="Navigation/Paste_fainoase.php">Paste fainoase</a>
      <ul></li>
      </ul>
      </li>
        <li><a href="Navigation/Carne.php">Carne</a>
      <ul>
        <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
         <li><a href="Navigation/Legume.php">Legume</a>
      <ul>
         <li><a href="Navigation/Proaspete.php">Proaspete</a></li>
         <li><a href="Navigation/Congelate.php">Congelate</a></li>
      </ul>
      </li>
         
      <li><a href="Navigation/Fructe.php">Fructe</a>
      <ul>
      </ul>
      </li>
      
      <li><a href="Navigation/Mezeluri.php">Mezeluri</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Lactate.php">Lactate</a>
        <ul>
          <li><a href="Navigation/Lapte_dulce.php">Lapte dulce</a></li>
          <li><a href="Navigation/Unt.php">Unt</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Branzeturi.php">Branzeturi</a>
        <ul>
          <li><a href="Navigation/Topita.php">Topita</a></li>
          <li><a href="Navigation/Telemea.php">Telemea</a></li>
          <li><a href="Navigation/Cascaval.php">Cascaval</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Sosuri.php">Sosuri</a>
        <ul>
          <li><a href="Navigation/Maioneza.php">Maioneza</a></li>
          <li><a href="Navigation/Chetchup.php">Chetchup</a></li>
          <li><a href="Navigation/Mustar.php">Mustar</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Cafea.php">Cafea</a>
        <ul>
          <li><a href="Navigation/Topita.php">Decofeinizata</a></li>
          <li><a href="Navigation/Telemea.php">Cofeina</a></li>
          <li><a href="Navigation/Cascaval.php">Instant</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Conserve.php">Conserve</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
          <li><a href="Navigation/Legume.php">Legume</a></li>
          <li><a href="Navigation/Fructe.php">Fructe</a></li>
          <li><a href="Navigation/Fructe.php">Altele</a></li>
      </ul>
      </li>
       <li><a href="Navigation/Tutun.php">Tutun</a></li>
      
      <li><a href="Navigation/Bauturi.php">Bauturi</a></li>
       <li><a href="Navigation/Bauturi_Alcoolice.php">Bauturi Alcoolice</a>
         <ul>   
          <li><a href="Navigation/Bere.php">Bere</a></li>
          <li><a href="Navigation/Vin.php">Vin</a></li>
          <li><a href="Navigation/Spirtoase.php">Spirtoase</a></li>
      </ul>
      </li>
          
          <li><a href="Navigation/Bauturi_Nealcoolice.php">Bauturi Nealcoolice</a>
         <ul>   
          <li><a href="Navigation/Ape.php">Ape</a>
        <ul>
          <li><a href="Navigation/Ape_minerale.php">Ape minerale</a>
          <li><a href="Navigation/Ape_plate.php">Ape plate</a></li>
        </ul>
         </li>  
          <li><a href="Navigation/Sucuri.php">Sucuri</a>
        <ul>
          <li><a href="Navigation/Sucuri_acidulate.php">Sucuri acidulate</a></li>
          <li><a href="Navigation/Sucuri_neacidulate.php">Sucuri neacidulate</a></li>
        </ul>
    </div>
<div id="footer">
</div>
    </div>
    <div id="comunicare">
	<?php
if (isset($_SESSION['logged']) && $_SESSION['logged'] == 1) {
// user is logged in
?>
<?php

$query = "SELECT * FROM site_user,site_user_info
        WHERE
        site_user.user_id=site_user_info.user_id and
        username= '" . mysql_real_escape_string($_SESSION['username']) . "'
       " ;
         
        $result = mysql_query($query)
        or die(mysql_error);
   
    while ($row=mysql_fetch_array($result)){
       $_SESSION['username']=$row['username'];
       $_SESSION['user_id']=$row['user_id'];
       
       }?>
       

<p class="legaturi">Iti multumim pentru inscriere,
<?php echo $_SESSION['username'];?>.</p>
<p class="legaturi">Acum poti <a href="user_personal.php">apasa aici</a> daca
doresti sa intri in contul tau personal unde poti solicta livrari
speciale si multe alte lucruri.</p>


<?php
if ($_SESSION['admin_level'] > 0) {
echo '<p class="legaturi"><a href="admin_area.php" > apasa aici </a>sa accesezi ' .
'uneltele administratorului. </p>';

}
} else {
// user is not logged in
?>

  
<p>In acest moment nu esti conectat.Odata inregistrat vei avea
acces la contul tau personal unde vei gasii si alte informatii
folositoare</p>
<p class="legaturi"> Daca esti inregistrat,<a href="login.php">apasa aici
</a>pentru conectare.Daca doresti sa-ti creezi un cont,
 <a  href="register.php">apasa aici</a> pentru crearea contului tau.</p>


<?php
//Navigaton
}
?>

<p class="legaturi"><a href='vizualizare_cos.php'>Verifica cosul</a></p>

    </div>
    </div>
    <div id="content">

  
	
	<?php
	//selecteaza produsele ce vor fi programate pt livrare
  $query="select*from produse";
	
	  $result = mysql_query($query)
        or die (mysql_error);
        
        $rows = mysql_num_rows($result);
    
         while($row=mysql_fetch_array($result)){
          $id_produs=$row['id_produs'];
          $Denumire_produs=$row['Denumire_produs'];
	  $Pret=$row['Pret'];
         echo '<div id="box"><img src="images/' . $id_produs .'.png" alt="' .
		    $Denumire_produs .'"/></a>'
	   
	   ."<p>". '<a href="detalii.php?id_produs='. $id_produs .'">'
	   .$Denumire_produs . '</p><p>'.'<a href="detalii.php?' .'id_produs=' . $id_produs . '">
	' . $Pret .'  '.' RON</a></p>';
         
         ?><fieldset id="cantitate">
         <form action="detalii.php"  method="post">
Cantitate: <input type="text" name="cantitate[]" value=" " size="1"/>
	   <input type="hidden" name="Denumire_produs[]" value="<?php echo $row['Denumire_produs'];?>"/>
           <input type="hidden" name="id_produs[]" value="<?php echo $row['id_produs'];?>"/>
           <input type="hidden" name="Pret[]" value="<?php echo $row['Pret'];?>"/></fieldset></div>




 <?php ;} ?>
	     
  
<input type="submit" value="cumpar"></form>


    </div>
    <div id="rightnav">
	<fieldset id="form">
<legend>Scrieti-ne aici.</legend>

    <form id="textform" action="index.php" method="post"/>



E-mail:<br/><input  type="text" name="email" /><br/>
Telefon:<br/><input  type="text" name="telefon" />
<textarea> name=cerere rows=4  cols=18 </textarea>

<input id="submit" type="submit" name="submit" value="cerere"/>
</form>  
</fieldset>
  
   	<?php
if(isset($_POST["email"])){$email=$_POST["email"];}
if(!empty($_POST["telefon"])){$telefon=$_POST["telefon"];}
if(isset($_POST["cerere"])){$cerere=$_POST["cerere"];

	$queryi="Insert into cereri
		(email,
		telefon,
		cerere
		)values(
		    '". $email ."',
		    '". $telefon ."',
		    '". $cerere ."')";
	//comunica eroarea trimisa de mysql	
	 if(isset($queryi) && !empty($queryi)) {  
        echo"<!--" . $queryi. "-->";
        $resulti = mysql_query($queryi)
        or die ("invalid query 4: " . mysql_error ());}
		
		echo "Cererea dvs a fost inregistrata cu nr". " ". mysql_insert_id();
		}
    ?>
    </div>
    
    
</body>
</html>
0

You've commented out all the code, that's why. Line 5, remove the /*.

/* is the start of a multi-line comment. To end it, you need to put */ at the end. If you want to comment a single line, you should use //.

Edited by Borzoi: Added information about comments.

0

no error reporting
....I have no such thing ...can you give me some detail about?

0
<?php error_reporting(E_ALL);?>

Still no move it completely blank

0

<?php must be on its own line.

Remove the comment Borzoi mentioned and add error_reporting(E_ALL); below the php tag. Like what I posted above.

0

I can not understand where is the wrong script...why no error show up?

0

I'm pretty sure session_start() should be before anything is outputted. You also have two <html> tags. Your first few lines should be like this:

<?php 
  session_start();
  error_reporting(E_ALL);
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php include("includes/connection.php");?>
<title>PRIMA PAGINA</title>
0

done and same result....it outrages on my machine with wamp it ok ,,,,

0
<?php 
error_reporting(E_ALL);?>
<?php session_start(); ?>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<?php  include("includes/connection.php");?>

<title>PRIMA PAGINA</title>

<body>

    <div id="logo">
    </div>
    <div id="top">
    <fieldset id="search">
       <legend id="search">CAUTARE RAPIDA</legend> 
    <form name="search" method="post" action="search.php"/>
    <input id="denumire_produs" type="text" name="denumire_produs"  />
  <p class="submit"><input type="image" src="images2/sageata.png" name="search" alt="submit" /></p>
    
    </form>
        </fieldset>
    </div>
  
    <div id="nav">
    <script src="Navigation/automenu.js">
</script>

<script src="automenu.js">
</script>
</head>


<link rel='stylesheet' type='text/css' href='../css/styles.css' />
<body onLoad="menu_main('s1')">

<div id="s1">
<ul>
  <li><a href="Index.php">Produse alimentare</a></li>
    
      <ul>
        <li><a href="Navigation/Produse_de_baza.php">Produse de baza</a>
          <ul>
          <li><a href="Navigation/Ulei.php">Ulei</a></li>
          <li><a href="Navigation/Zahar.php">Zahar</a></li>
          <li><a href="Navigation/Faina.php">Faina</a></li>
      </ul>
      </li>
        
          <li><a href="Navigation/Dulciuri.php">Dulciuri</a>
        <ul>
          <li><a href="Navigation/Bomboane.php">Bomboane</a></li>
          <li><a href="Navigation/Biscuiti.php">Biscuiti</a></li>
          <li><a href="Navigation/Ciocolata.php">Ciocoalata</a></li>
          <li><a href="Navigation/Napolitane.php">Napolitane</a></li>
      </ul>
      </li>
           
           <li><a href="Navigation/Paste_fainoase.php">Paste fainoase</a>
      <ul></li>
      </ul>
      </li>
        <li><a href="Navigation/Carne.php">Carne</a>
      <ul>
        <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
         <li><a href="Navigation/Legume.php">Legume</a>
      <ul>
         <li><a href="Navigation/Proaspete.php">Proaspete</a></li>
         <li><a href="Navigation/Congelate.php">Congelate</a></li>
      </ul>
      </li>
         
      <li><a href="Navigation/Fructe.php">Fructe</a>
      <ul>
      </ul>
      </li>
      
      <li><a href="Navigation/Mezeluri.php">Mezeluri</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
        <li><a href="Navigation/Porc.php">Porc</a></li>
        <li><a href="Navigation/Pui.php">Pui</a></li>
        <li><a href="Navigation/Vita.php">Vita</a></li>
        <li><a href="Navigation/Altele.php">Altele</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Lactate.php">Lactate</a>
        <ul>
          <li><a href="Navigation/Lapte_dulce.php">Lapte dulce</a></li>
          <li><a href="Navigation/Unt.php">Unt</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Branzeturi.php">Branzeturi</a>
        <ul>
          <li><a href="Navigation/Topita.php">Topita</a></li>
          <li><a href="Navigation/Telemea.php">Telemea</a></li>
          <li><a href="Navigation/Cascaval.php">Cascaval</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Sosuri.php">Sosuri</a>
        <ul>
          <li><a href="Navigation/Maioneza.php">Maioneza</a></li>
          <li><a href="Navigation/Chetchup.php">Chetchup</a></li>
          <li><a href="Navigation/Mustar.php">Mustar</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Cafea.php">Cafea</a>
        <ul>
          <li><a href="Navigation/Topita.php">Decofeinizata</a></li>
          <li><a href="Navigation/Telemea.php">Cofeina</a></li>
          <li><a href="Navigation/Cascaval.php">Instant</a></li>
      </ul>
      </li>
      
      <li><a href="Navigation/Conserve.php">Conserve</a>
        <ul>
          <li><a href="Navigation/Peste.php">Peste</a></li>
          <li><a href="Navigation/Legume.php">Legume</a></li>
          <li><a href="Navigation/Fructe.php">Fructe</a></li>
          <li><a href="Navigation/Fructe.php">Altele</a></li>
      </ul>
      </li>
       <li><a href="Navigation/Tutun.php">Tutun</a></li>
      
      <li><a href="Navigation/Bauturi.php">Bauturi</a></li>
       <li><a href="Navigation/Bauturi_Alcoolice.php">Bauturi Alcoolice</a>
         <ul>   
          <li><a href="Navigation/Bere.php">Bere</a></li>
          <li><a href="Navigation/Vin.php">Vin</a></li>
          <li><a href="Navigation/Spirtoase.php">Spirtoase</a></li>
      </ul>
      </li>
          
          <li><a href="Navigation/Bauturi_Nealcoolice.php">Bauturi Nealcoolice</a>
         <ul>   
          <li><a href="Navigation/Ape.php">Ape</a>
        <ul>
          <li><a href="Navigation/Ape_minerale.php">Ape minerale</a>
          <li><a href="Navigation/Ape_plate.php">Ape plate</a></li>
        </ul>
         </li>  
          <li><a href="Navigation/Sucuri.php">Sucuri</a>
        <ul>
          <li><a href="Navigation/Sucuri_acidulate.php">Sucuri acidulate</a></li>
          <li><a href="Navigation/Sucuri_neacidulate.php">Sucuri neacidulate</a></li>
        </ul>
    </div>
<div id="footer">
</div>
    </div>
    <div id="comunicare">
    <?php
if (isset($_SESSION['logged']) && $_SESSION['logged'] == 1) {
// user is logged in
?>
<?php

$query = "SELECT * FROM site_user,site_user_info
        WHERE
        site_user.user_id=site_user_info.user_id and
        username= '" . mysql_real_escape_string($_SESSION['username']) . "'
       " ;
         
        $result = mysql_query($query)
        or die(mysql_error);
   
    while ($row=mysql_fetch_array($result)){
       $_SESSION['username']=$row['username'];
       $_SESSION['user_id']=$row['user_id'];
       
       }?>
       

<p class="legaturi">Iti multumim pentru inscriere,
<?php echo $_SESSION['username'];?>.</p>
<p class="legaturi">Acum poti <a href="user_personal.php">apasa aici</a> daca
doresti sa intri in contul tau personal unde poti solicta livrari
speciale si multe alte lucruri.</p>


<?php
if ($_SESSION['admin_level'] > 0) {
echo '<p class="legaturi"><a href="admin_area.php" > apasa aici </a>sa accesezi ' .
'uneltele administratorului. </p>';

}
} else {
// user is not logged in
?>

  
<p>In acest moment nu esti conectat.Odata inregistrat vei avea
acces la contul tau personal unde vei gasii si alte informatii
folositoare</p>
<p class="legaturi"> Daca esti inregistrat,<a href="login.php">apasa aici
</a>pentru conectare.Daca doresti sa-ti creezi un cont,
 <a  href="register.php">apasa aici</a> pentru crearea contului tau.</p>


<?php
//Navigaton
}
?>

<p class="legaturi"><a href='vizualizare_cos.php'>Verifica cosul</a></p>

    </div>
    </div>
    <div id="content">

  
    
    <?php
    //selecteaza produsele ce vor fi programate pt livrare
  $query="select*from produse";
    
      $result = mysql_query($query)
        or die (mysql_error);
        
        $rows = mysql_num_rows($result);
    
         while($row=mysql_fetch_array($result)){
          $id_produs=$row['id_produs'];
          $Denumire_produs=$row['Denumire_produs'];
      $Pret=$row['Pret'];
         echo '<div id="box"><img src="images/' . $id_produs .'.png" alt="' .
            $Denumire_produs .'"/></a>'
       
       ."<p>". '<a href="detalii.php?id_produs='. $id_produs .'">'
       .$Denumire_produs . '</p><p>'.'<a href="detalii.php?' .'id_produs=' . $id_produs . '">
    ' . $Pret .'  '.' RON</a></p>';
         
         ?><fieldset id="cantitate">
         <form action="detalii.php"  method="post">
Cantitate: <input type="text" name="cantitate[]" value=" " size="1"/>
       <input type="hidden" name="Denumire_produs[]" value="<?php echo $row['Denumire_produs'];?>"/>
           <input type="hidden" name="id_produs[]" value="<?php echo $row['id_produs'];?>"/>
           <input type="hidden" name="Pret[]" value="<?php echo $row['Pret'];?>"/></fieldset></div>




 <?php ;} ?>
         
  
<input type="submit" value="cumpar"></form>


    </div>
    <div id="rightnav">
    <fieldset id="form">
<legend>Scrieti-ne aici.</legend>

    <form id="textform" action="index.php" method="post"/>



E-mail:<br/><input  type="text" name="email" /><br/>
Telefon:<br/><input  type="text" name="telefon" />
<textarea> name=cerere rows=4  cols=18 </textarea>

<input id="submit" type="submit" name="submit" value="cerere"/>
</form>  
</fieldset>
  
       <?php
if(isset($_POST["email"])){$email=$_POST["email"];}
if(!empty($_POST["telefon"])){$telefon=$_POST["telefon"];}
if(isset($_POST["cerere"])){$cerere=$_POST["cerere"];

    $queryi="Insert into cereri
        (email,
        telefon,
        cerere
        )values(
            '". $email ."',
            '". $telefon ."',
            '". $cerere ."')";
    //comunica eroarea trimisa de mysql    
     if(isset($queryi) && !empty($queryi)) {  
        echo"<!--" . $queryi. "-->";
        $resulti = mysql_query($queryi)
        or die ("invalid query 4: " . mysql_error ());}
        
        echo "Cererea dvs a fost inregistrata cu nr". " ". mysql_insert_id();
        }
    ?>
    </div>
    
    
</body>
</html>
0

-You have no opening <head> tag.
-Remove the opening <body> tag on line 13.
-Move lines 15-33 into the body tag lower in the page.
-Move line 37 up so that is is in the <head> tag.

Just looking through the rest of it for any more errors.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.