You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order='12', short_code='', format='', width='200', height='200',picture1='', lin' at line 1
Expand|Select|Wrap|Line Numbers
- <?php
- session_start();
- if($email = $_SESSION['email'])
- {
- require("include/connections.php");
- $id=$_GET['id'];
- if(isset($_REQUEST['submit']))
- {
- $title=$_REQUEST['title'];
- $location=$_REQUEST['location'];
- $short_code=$_REQUEST['short_code'];
- $order=$_REQUEST['order'];
- $format=$_REQUEST['format'];
- $width=$_REQUEST['width'];
- $height=$_REQUEST['height'];
- $picture1=$_FILES['fileupload1']['name'];
- $link=$_REQUEST['link'];
- $safe_content=$_REQUEST['safe_content'];
- $unsafe_content=$_REQUEST['unsafe_content'];
- $status=$_REQUEST['status'];
- $query = mysql_query("UPDATE banners SET title='$title', location='$location', order='$order', short_code='$short_code', format='$format', width='$width', height='$height',picture1='$picture1', link='$link', safe_content='$safe_content', unsafe_content='$unsafe_content', status='$status' WHERE ID='$id'");
- if($query){
- header("Location:banners.php");
- }else{
- echo(mysql_error());
- }
- {if($picture1!="")
- {
- $uploading1=$_FILES['fileupload1']['name'];
- $path1="images_page/".$uploading1;
- copy($_FILES['fileupload1']['tmp_name'],$path1);
- }
- else
- {
- $uploading1 = 'noimage.jpg';
- }
- }
- }
- }
- ?>