Jump to content

Request id


newhip

Recommended Posts

I have a basic understanding of php but there's a lot things I don't get.

I made an upload form that is processed by an upload.php file. Here's the code.

 

 

<?php

$conn=mysql_connect("localhost","root","");

$select=mysql_select_db("project",$conn);

$title=$_POST['title'];

$pic=$_FILES['pic']['tmp_name'];

$pic2=$_FILES['pic']['name'];

$desc=$_POST['desc'];

$path="upload/".$pic2;

$themove=move_uploaded_file($pic,$path);

$sqlqry=mysql_query("INSERT INTO media(title,pic,desct) VALUES ('$title','$path','$desc')");

$searr="SELECT * FROM media ";

$seartt=mysql_query($searr);

$burp=mysql_fetch_array($seartt);

$ab=mysql_query($_REQUEST['desct']);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>New Uploaded Page</title>

</head>

 

<body>

<a href="#"><h1><?php echo $burp['title']; ?></h1></a><br /><br />

<img src="<?php

echo $burp['pic'];

 

?>" /><br /><p><br /><?php

echo $burp['desct'];

?></p>

</body>

</html>

 

I'm trying to request the different pages in the url for the things that are inputted in my table. Can anyone help me understand. or even remotely understand what i'm trying to do.

Link to comment
Share on other sites

1. Post in the right forum next time please. I'm moving this. 

2. Use code tags so we can read your code.

3. Your select query is getting ALL the rows in your table, except you only run it once so it gets the first one every time.  use mysql_insert_id.

Link to comment
Share on other sites

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.