[Freerealty] Big glitch in image uploading
Scott Wang
scott at scottscomputing.com
Mon Apr 25 11:11:59 MST 2005
What a hair puller. When I upload an image from the Edit Listings area, the
image would not show up in the listing at all.
After some digging I found in the MySQL database that the "prop_num" column
had a "0" instead of the listing number.
In admin.php I found this:
if (isset($action) && $action == "upload")
{
$binFile = $_FILES['binFile']['tmp_name'];
$binFile_type = $_FILES['binFile']['type'];
$extra = array( "txtDescription"=>"$txtDescription",
"propnum"=>"$current_user", "binFile_name"=>"$binFile_name",
"binFile_size"=>"$binFile_size", "table_prefix"=>"$table_prefix",
"agentorprop"=>"prop");
store_image ($binFile, $binFile_type, $extra);
}
What in the world does "propnum"=>"$current_user" do? I changed it to
"propnum"=>"$edit", (since I knew $edit was being used as a parameter in the
address) and it's working OK now.
- Scott Wang
Scott's Computing
P.O. Box 472 Thorp, WI 54771
Office: 715-669-5412 Fax: 715-669-5413
Email: scott at scottscomputing.com
More information about the FreeRealty
mailing list