Passing PHP Variable From One Dynamic Page to Another

后端 未结 2 1328
-上瘾入骨i
-上瘾入骨i 2021-01-28 12:09

I am trying to pass on some variables using SESSION from one PHP page to the next.

The first page contains this code and after the user clicks submit, it goes to Page 2:

2条回答
  •  遇见更好的自我
    2021-01-28 12:55

    Are you sure your variables are set i.e. $totalcost? A comment on your code. Unless, you are breaking in and out of PHP and HTML, you do not need to open and close PHP on every line.

    This can be rewritten:

    
    
    
    
    
    
    

    As:

    
    

提交回复
热议问题