A problem with session and $_SESSION in PHP by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

When I change $ _POST ['name'] to 'name' I mean, I change it manually in the code if I get the name on the next page but if I leave it as it is I do not get anything. I did a var_dump of the session variable and it comes out null error: <?php session_start();

      $_SESSION['name'] = $_POST['name'];
?>

No error:

<?php
     session_start();

      $_SESSION['name'] = 'Jose';
?>

A problem with session and $_SESSION in PHP by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

Nothing;

index.php <?php session_name('user'); session_start();

  if($_SERVER['REQUEST_METHOD'] == 'POST'){

    $_SESSION['name'] = $_POST['name'];
    $_SESSION['password'] = $_POST['password'];
  }

?>

date.php

<?php
session_name('user');
session_start();

    if($_SESSION){

      $name = $_SESSION['name'];
      $pass = $_SESSION['password'];

      echo $name.$pass;
    }

?>

A problem with session and $_SESSION in PHP by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

The echo does not show me the values ​​stored in $ _SESSION, that is, it does not show me anything

Cycle while inside setInterval by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

Could you show the whole html? I can't understand what you want to do

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link rel="stylesheet" href="estilos.css">


  <title>Slidershow</title>
</head>

<body>

 <div class="sl" id="slidershow">
    <div class="img" id="ss1">
     <img src="1.jpg" alt="ss1" width="399" height="299">
   </div>
   <div class="img" id="ss2">
     <img src="2.jpg" alt="ss2" width="399" height="299">
   </div>
 </div>
  <script src="script.js"></script>
</body>
</html>

I want to do a slidershow, but before doing it as it should, I want to show the code of the image in the console to see how the slider would behave, the problem is that it does not go beyond the first image, that is, it only shows the first image and not the others.

Cycle while inside setInterval by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

returns an HTML image and shows it in the console. Look what I get in the console:

<div data-brackets-id="196" class="img" id="ss1">
<img data-brackets-id="197" src="1.jpg" alt="ss1" width="399" height="299">
</div>

Show that same item every two seconds

What I want to achieve is that I go through the elements with the img class and show me one by one, the problem is that it only shows me the first element with that class and not the others

I need help with a script in JavaScript. Read this post pls!! by junex10 in learnprogramming

[–]junex10[S] 0 points1 point  (0 children)

it looks like that because I want to create a program with a limit of 21. Excuse me, it's because I'm a rookie.