Jump to content

Recommended Posts

this is a followup to my last topic, which was solved

http://www.phpfreaks.com/forums/index.php/topic,226621.0.html

 

but now the topic has changes enough to warrant a new topic

and a repost of my last post in the previous topic, which contains the question I wanted to ask here

 

so I want to split apart my post array so i can query the db

 

post looks like this

 

$_POST[1]['word']

$_POST[1]['replace']

 

$_POST[2]['word']

$_POST[2]['replace']

 

where the integer is a row number

 

so to split it apart i use

<?php
foreach ($_POST[] as $word, $replace){
      mysql_query("UPDATE badwords SET word = $word WHERE id={$_POST['id']}");
//repeat for replace
}
?>

 

is that right?

 

thanks

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.