Previous Thread
Next Thread
Print Thread
Rate Thread
#104461 05/17/2002 2:34 PM
Joined: Aug 2001
Posts: 155
Member
Member
Offline
Joined: Aug 2001
Posts: 155
OK, I've been trying to get this to work for over a week, but still no luck.

What I'm trying to do is this: I have an upload script that's a modified attachment uploader for a php forum (don't kill me! it's easier to integrate with the site). I'm trying to add an option so that I can "lock" the file. When the file is "locked", the forum loads a template displaying all information on the file except the actual download link. This works perfectly fine if I manually edit the mysql field through phpadmin, but I can't get the script to work right so that I can lock it from the forum.

my php code (more or less):

Code
[/code]html template I'm working with (form and send buttons etc on the template it loads to)

[code]
I've tried tons of different ways to do it (both html and code wise) but can't get it to work.

that's the code as I have it right now. Doesn't give me any errors, just doesn't set attachments[attach_status] to 1 (in the db) when I want it too.

link: http://filedb.4x4customs.net/thread.php?threadid=54&boardid=14&page=1#1

pic: http://www.4x4customs.net/staff/gts/editscreen.jpg


I'm not really back. I went away again.
Sponsored Links
#104462 05/17/2002 5:39 PM
Joined: Apr 2002
Posts: 111
PF Offline
Member
Member
Offline
Joined: Apr 2002
Posts: 111
Couple of things....

Firstly.. Your Input checkbox doesn't line up with an variables. Supposed to be like that?

Secondly.. If you can output the SQL Statement
e.g.

echo ("UPDATE bb".$n."_attachments SET attach_status='0' WHERE attachmentid='$post[uploadid]'");
in the first one and
echo ("UPDATE bb".$n."_attachments SET attach_status='1' WHERE attachmendid='$post[uploadid]'");

in the second.
this will help you see if the SQL is doing what you're wanting it to do.

#104463 05/17/2002 11:44 PM
Joined: Aug 2001
Posts: 155
Member
Member
Offline
Joined: Aug 2001
Posts: 155
quote:
Originally posted by PF:
Couple of things....

Firstly.. Your Input checkbox doesn't line up with an variables. Supposed to be like that?

oops, you mean $filestatus and file_status? Well, in my php file i had about 5 different ways i'd been trying it commented out, and I'd changed the variables several times. Those were right when I actually tried using it, just not when I was trying to make everything match to post here.
Looking at the code now thought, I dunno what i was doing.. lol

quote:


Secondly.. If you can output the SQL Statement
e.g.

echo ("UPDATE bb".$n."_attachments SET attach_status='0' WHERE attachmentid='$post[uploadid]'");
in the first one and
echo ("UPDATE bb".$n."_attachments SET attach_status='1' WHERE attachmendid='$post[uploadid]'");

in the second.
this will help you see if the SQL is doing what you're wanting it to do.

yea, I dunno. I'll play with it some more later. Right right I'm haxing the crap out of my CP, getting lost in the jungle of code...


I'm not really back. I went away again.

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)