0

I have a session array containing lessonid, lesson name and description.

<?php
include "db.php";
$_SESSION['lesson_ids'];
?>


<table>
<tr><td>Lesson name </td> <td> description </td></tr>
<tr><td><input type="button" name="next" value="next">
</table>

In that session array, I have 3 sets of data. I want to display one lesson in the current page.

When I click next the button, I need to display the next one.

How can this be done?

2
  • How is this related to mysql? Where is the HTML form to submit the button? What is the structure of the session array $_SESSION['lesson_ids']; ? Commented Jul 30, 2011 at 14:50
  • Slightly related: Wouldn't it make sense to make this part of the url instead? /lesson/1/chapter/2/page/3 Commented Jul 30, 2011 at 14:58

1 Answer 1

1
echo $_SESSION['lesson_id'];

...

to increase this value, use

$_SESSION['lesson_id']++;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.