Jump to content

[SOLVED] MYSQL Update Syntax Help


nightcrawler

Recommended Posts

Not sure how the syntax is supposed to work for Update Queries with POST data.  Help Please.

 

$q = "UPDATE articles SET sub=$_POST['c'], 
title=$_POST['t'], 
name=$_POST['n'], 
email=$_POST['e'], 
date=$_POST['d'], 
description=$_POST['d'] WHERE id=$_POST['articleid'] LIMIT 1";

 

<?php
$q = "UPDATE articles SET sub='$_POST[c]', 
title='$_POST[t]', 
name='$_POST[n]', 
email='$_POST[e]', 
date='$_POST[d]', 
description='$_POST[d]' WHERE id='$_POST[articleid]' LIMIT 1";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.