php - Move Items From Column to Another -


so have row in table , 1 of columns called "unsorted" , in there have items listed item01, item02, item03 , want able move (not all) of items column column called "tradingcards".

i want able via form on site. i've got form coded, i'm not sure put mysql query. using update wasn't working.

any appreciated!

this have far:

<form method="post" action="mem_unsorted.php?thanks"> <input type="hidden" name="id" value="<?php echo $row[id]; ?>" /> <input type="hidden" name="name" value="<?php echo $row[name]; ?>" /> <table id="cards"> <?php $select = mysql_query("select unsorted `$table_members` email='$_session[usr_login]'"); while($rows = mysql_fetch_array($select)) {    $card1=explode(', ', $rows['unsorted']);    sort($card1);    foreach($card1 $out) {       echo "<td>";       echo "<img src=\"/cards/";       echo "$out";       echo ".png\" style=\"padding: 2px\"><br>\n";       echo "<input type=\"hidden\" name=\"cards\" value=\"$out\">\n";       echo "<select name=\"move\">\n";       echo "<option value=\"none\">---</option>\n";       echo "<option value=\"collectingcards\">collect</option>\n";       echo "<option value=\"keepingcards\">keep</option>\n";       echo "<option value=\"tradingcards\">trade</option>\n";       echo "</select></td>\n";    } }     ?><td colspan="5"><input type="submit" name="submit" value=" submit! " /></td> </table></form> </center> 

and "thanks" part far:

        if (!isset($_post['submit']) || $_server['request_method'] != "post") {         exit("<p>you did not press submit button; page should not accessed directly.</p>");     }      else {                  foreach ($_post $key => $value) {                 $value = trim($value);                               $_post[$key] = stripslashes(strip_tags($value));             }      $id = escape_sql(cleanup($_post['id']));     $name = escape_sql(cleanup($_post['name']));     $cards = escape_sql(cleanup($_post['cards']));     $move = escape_sql(cleanup($_post['move']));     } } 


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -