Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rebonjour, désoler de vous redéranger mais j'ai encore un soucis avec mes scripts je vous assure que j'ai encore chercher mais impossible de trouver d'où viens l'erreur.
- Voici le script en question :
- [code]
- <?php
- session_start();
- if (isset ($_POST['new_name']) AND isset($_POST['renommer']))
- {
- // On rénomme la planete
- try
- {
- $bdd = new PDO('mysql:host=localhost;dbname=new_time', 'root', '');
- }
- catch(Exception $e)
- {
- die('Erreur : '.$e->getMessage());
- }
- // On modifie le nom de la planete
- $bdd->exec('UPDATE user SET name_planete =\'' . $_POST['new_name'] . '\' WHERE user =\'' . $_SESSION['pseudo'] . '\'');
- echo 'Le nom a bien été modifié !';
- echo"</br> <a href='game.php'>Retour</a>";
- }
- elseif (isset ($_POST['mine_m_new']))
- {
- if ($_SESSION['mine_m_lvl'] == $_SESSION['level_max_m'])
- {
- echo "Votre mine à atteind son niveau maximum";
- }
- elseif($_SESSION['metal'] < $_SESSION['metal_n_m'] OR $_SESSION['cristal'] < $_SESSION['metal_n_c'] OR $_SESSION['kryptonite'] < $_SESSION['metal_n_k'])
- {
- echo "Vous n'avez pas assez de ressource !";
- }
- else
- {
- //On
- try
- {
- $bdd = new PDO('mysql:host=localhost;dbname=new_time', 'root', '');
- }
- catch(Exception $e)
- {
- die('Erreur : '.$e->getMessage());
- }
- // On ajoute un niveau à la mine
- $_SESSION['mine_m_lvl'] = $_SESSION['mine_m_lvl'] + 1 ;
- $bdd->exec('UPDATE user SET mine_m_lvl =' . $_SESSION['mine_m_lvl'] . ' WHERE user =\'' . $_SESSION['pseudo'] . '\'');
- echo 'Votre mine à bien évolué jusqu\'au niveau ' . $_SESSION['mine_m_lvl'] . ' !';
- echo"</br> <a href='game.php'>Retour</a>";
- }
- else
- {
- echo " Raté ";
- }
- ?>
- [/code]
- Et voici le message d'erreur :
- [code]
- Parse error: parse error in C:\wamp\www\New Time\action.php on line 48
- [/code]
- Encore un fois merci d'avance pour votre aide, cordialement Rayon-gama.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement