this is the code that works

if (isset($_POST['add_to_cart'])) {
                   if (isset($_POST['select_size']) && isset($_POST['select_color']) && isset($_POST['select_quantity'])) {
                       $size = $_POST['select_size'];
                       $color = $_POST['select_color'];
                       $quantity = $_POST['select_quantity'];

                       if (isset($_GET['lang'])) {
                           $the_lang = mysqli_real_escape_string($connection, $_GET['lang']);

                               if ($the_lang == 'ro') {
                                   $product_name = $product_name_ro;
                               } else if ($the_lang == 'en') {
                                   $product_name = $product_name_en;
                               } else if ($the_lang == 'fr') {
                                   $product_name = $product_name_fr;
                               }
                       } else {
                           $product_name = $product_name_ro;
                       }

                       if (isset($_GET['coin'])) {
                           $the_coin = mysqli_real_escape_string($connection, $_GET['coin']);

                           if ($the_coin == 'ron') {
                               $price = $product_price_ron;
                               $the_coin = 'RON';
                           } else if ($the_coin == 'dollar') {
                               $price = $product_price_dollar;
                               $the_coin = '$';
                           } else if ($the_coin == 'euro') {
                               $price = $product_price_euro;
                               $the_coin = '€';
                           }
                       } else {
                           $price = $product_price_ron;
                           $the_coin = 'RON';
                       }
                    }

                    $total_price = $price * $quantity;

                    $_SESSION['cart'][$product_id] = array('product_name' => $product_name, 'coin' => $the_coin, 'price' => $price, 'total_price' => $total_price, 'size' => $size, 'color' => $color, 'quantity' => $quantity);

                    $temp = $_SESSION['cart'];
                    array_push($_SESSION['cart'][$product_id], $temp);

                    header("Location: ".$_SERVER['HTTP_REFERER']);
                   } 

and the print_r of the array is

Array ( [4] => Array ( [product_name] => Pantofi Zara [coin] => RON [price] => 11 [total_price] => 11 [size] => l [color] => red [quantity] => 1 [0] => Array ( [4] => Array ( [product_name] => Pantofi Zara [coin] => RON [price] => 11 [total_price] => 11 [size] => l [color] => red [quantity] => 1 ) ) ) )

good
this is the code that's not working

if (isset($_GET['add_to_cart'])) {
                        $the_product_id = mysqli_real_escape_string($connection, $_GET['add_to_cart']);

                        $query = "SELECT * FROM products ...

it worked earlier

I tried loading a swf through

<mx:SWFLoader source="game.swf" /> 

(The game.swf is a flash free game if this helps) But it displayed blank, white screen. Why?

i think you want to do something like this right?
Click Here

what about an "if" "else if" "else" statement to activate only one at a time?

for creating the file you can use the fopen() funtion, if there no file the function will create one

i don't have cpanel or plesk, i have somekind of control panel

here's the image
www.jocurigratisonlinenet.ro/user/axxxA/avatar.jpg

yes but there it tells me to modify apache configurations and restart it. I cant do that on my host

this script some how takes the structure of directories and puts it into links
the structure is like 'http://localhost/jocuri/action/jocuri/name_of_the_game/'
my goal is to remove somehow the 'jocuri' link from display
if statement that is triggered is the one from line 8, when i'am in 'localhost//jocuri/action/jocuri/' the link is different and is 'localhost//user/jocuri/user/action' somehow user is added. why?

at line 8 the code outputs the 'jocuri' link and the address is 'http://localhost/user/jocuri' but it should be 'http://localhost/jocuri' without 'user', somehow inherited the code from line 14 or line 18. how can i get around?

i encountered another problem, so i have updated the code like this:

public function crumbs()
    {
        foreach($this->parts as $part)
        {
            if ($part=='user') {

            }
            else if ($part!='jocuri') {
                $this->url .= "/jocuri/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">'.strtoupper(str_replace($repl, ' ', $part)).'</a>';  
            }
             else if ($part==$_SESSION['Username']) {
                $this->url .= "/user/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">'.strtoupper(str_replace($repl, ' ', $part)).'</a>';
            }
            else if ($part!==$_SESSION['Username']) {
                $this->url .= "/user/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">'.strtoupper(str_replace($repl, ' ', $part)).'</a>';
            }
             else if ($part=='login') {
                $this->url .= "/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">'.strtoupper(str_replace($repl, ' ', $part)).'</a>'; 
            } else if ($part=='contact') {
                $this->url .= "/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">'.strtoupper(str_replace($repl, ' ', $part)).'</a>';
            } else if ($part=='registration') { 
                $this->url .= "/$part";
                $repl = array('_', '...');
                $this->breadcrumbs .= " $this->pointer ".'<a class="bc" href="'.$this->url.'">INREGISTARE</a>';
            }
        }
    }

i dont have any control over the server

i get "open_basedir restriction in effect. File(/usr/local/apache/htdocs/user/name_of _user/avatar.jpg) is not within the allowed path(s)"

i'm not sure will work because the code is in a included file through many levels

not working

this is the code

if (file_exists('/user/'.$_SESSION['Username'].'/avatar.jpg')) {
echo 'Exists';
} else {
    echo 'Doesn\'t exist';
}

and i get the negative case

i will leave this like this right now because i made a script to auto write the code for testing thanks

it works thanks

for writing an entire page with the code

74 is right at start of the code

i get "Parse error: syntax error, unexpected T_IS_EQUAL, expecting ',' or ')' in /home/user/public_html/user/axxxA/index.php on line 74"

what i'm doing wrong?

<?php if (isset($_SESSION['Username']=='axxxA')) {
echo '<form action="upload.php" enctype="multipart/form-data" method="POST">
    <input type="file" name="file" /><br /><br />
    <input type="submit" value="Upload" />
</form>';
                } else {
                    echo 'Trebuie sa fii logat ca axxxA pentru a modifica profilul.';
                }
                ?>

i solve it with

dirname(__FILE__)

well i get an echo of $tmp_name after the function is called

when i try

echo $tmp_name = $_FILES['file']['tmp_name'];

nothing is displayed

not working

what if i define the location of the temp file or folder in my "public_html"

i did

<?php
if (is_dir($tmp_name = $_FILES['file']['tmp_name'])) {
    echo 'the temporary folder exists<br>';
} else {
    echo 'the temp folder doesn\'t exist<br>';
}

if (is_dir('/user'.$_SESSION['Username'])) {
        echo 'the temporary folder exists';
} else {
    echo 'the main folder doesn\'t exist';
}
?>

i get the negative answers
but for the second i know for sure it exists

the user exist the other one i can't check it i'm on a free host