So I looked into other threads but didnt find a solution that worked for me.
Here is my problem:
the first page is supposed to get information from a form, look for it in a database, store it in a variable $_SESSION['$dataArray'] and send it to the second page.
On the second page it gives an error: Uncaught SyntaxError: Unexpected token < result.php:20.
When I look in the source in chrome it says: var schoolData = <br />
<b>Notice</b>: Undefined index: $dataArray in <b>C:\xampp\htdocs\highschools.bg\result.php</b> on line <b>23</b><br />
How is this an unidentified index? When i can only go to the second page after visiting the first, where I assing a value to $_SESSION['$dataArray'].
How can I solve this?