how to store variable values over multiple page loads

前端 未结 7 479
南笙
南笙 2020-12-18 07:34

I\'m making a php script that stores 3 arrays: $images, $urls, $titles based on the input data of the form within the php file.

<
相关标签:
7条回答
  • 2020-12-18 08:26

    The solution you are looking for is the session. Use $_SESSION to store value of Your variables. For example, at the end of script:

    $_SESSION['images'] = $images;
    

    and in form's input:

    <input name='i".$x."' type='text' value='".(isset($_SESSION['images']) ? 
    $_SESSION['images'] : '')."'>
    
    0 讨论(0)
提交回复
热议问题