tags:

views:

34

answers:

2

I have another question: when user selected dynamic tab its swapped image. How to save user made changes in SQL or maybe in XML file :)

How JapanPro wrote $.post('sendData.php', function(data) { $('.result').html(data); }); it can be solution. But someone can show example for sendData.php

Maybe:

<?php
    $packed = $_GET['data'];
    $data = split(",", $packed);
    for ($i = 0; ($i < count($data)); $i++) {
        .... 

I don't know, any solution?

A: 

Keep it simple

its simple just pass js data to php file, in php file read those data , update sqlquery and return true; receive true in js , update success using DOM

Watch similar tuts video

JapanPro
Nation
Image swap is working. but jquery dont swap image through div id but div class. If I can make it swap image through div id it will be easy for jqery .post an php .get. Because ID is unique each dinamic div.
Nation
A: 

For the packed data the best solution is use any javascript json encoding library (for example, if you use jQuery, http://code.google.com/p/jquery-json/) and then decode it in the server side json_decode($data);

José Manuel Lucas
tnx mate, i will see for your solution :)
Nation
does it work for you?
José Manuel Lucas