Re: [PHP] Hidden File Downloads
Stuart Nielson wrote: I am trying to setup a script that allows people to upload files for specific, permissions-based, projects. i.e. There are logs that are viewable to clients only after login. The admin also has the ability to upload files. These files should be associated with a particular log, and then should show up at the bottom of the log as a link. Because it's permissions-based, however, the file should not be a standard ftp/http link pointing to the file, but should rather be a script that grabs the file, and sends it to the user. A good example of this is Adobe. When downloading tryout software from their site, there is something like this: http://www.adobe.com/products/tryadobe/thankyou.jsp? ftpID=2391&fileID=2270 Does anybody know how to do this with php? I'm not sure how to find the file in the backend and kick it back to the user with the "Save As" box popping up. I'm thinking maybe it has something to do with headers, but I'm not sure. Thanks. Stuart Hi Stuart, You should use the function "fpassthru". You'll need to play with the headers, check the user contributed notes on http://www.php.net/manual/en/function.fpassthru.php Cheers, Pascal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] String conversion function
Simon Fredriksson wrote: I'm wondering if there's any easy way to convert special chars to the numerical version of it. Like space converts to %20 and slash (/) to %2F. rawurlencode is what you're looking for -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php arrays into flash
Jim McNeely wrote: I know a lot more about php than about flash (which is probably sad) but does anyone know how to take info in an array and pass it into an array in flash? I think they have arrays, but the only thing I can seem to find in flash to get info from php is the loadvariable actionscript step. I looked around via google and I couldn't find anything within a reasonable time that seemed to answer this question. You can do it via XML, or you could use serialize in PHP and write an unserialize function in ActionScript. Macromedia Flash MX Documentation: http://www.macromedia.com/support/flash/documentation.html TIA Jim McNeely Envision Data [EMAIL PROTECTED] http://www.envisiondata.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql_num_rows problem
with insert, update and delete you must use mysql_affected_rows() http://www.php.net/manual/en/function.mysql-affected-rows.php - Original Message - From: "Rodrigo Peres" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 4:58 PM Subject: [PHP] php mysql_num_rows problem > Hi list, > > I have a class to perform my tasks to bd, among than there's this function > > function executa($sql="") { > if($sql == "") { > $this->resultado = 0; > $this->numrows = 0; > $this->row = -1; > } > $this->resultado = mysql_query($sql,$this->conexao->id); > $this->numrows = mysql_num_rows($this->resultado); > } > everything works fine, except when I tri to insert a record. It inserts, but > give an error > > "Warning: Supplied argument is not a valid MySQL result resource in > /home/restricted/home/papagaiodigital/public_html/recrutamento/includes/clas > sesql.inc on line 22" > > line 22 is "$this->numrows = mysql_num_rows($this->resultado);" > > what's the problem?? > > Thank's n advance > > Rodrigo Peres > -- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql_num_rows problem
with insert, update and delete you must use mysql_affected_rows() - Original Message - From: "Rodrigo Peres" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 4:58 PM Subject: [PHP] php mysql_num_rows problem > Hi list, > > I have a class to perform my tasks to bd, among than there's this function > > function executa($sql="") { > if($sql == "") { > $this->resultado = 0; > $this->numrows = 0; > $this->row = -1; > } > $this->resultado = mysql_query($sql,$this->conexao->id); > $this->numrows = mysql_num_rows($this->resultado); > } > everything works fine, except when I tri to insert a record. It inserts, but > give an error > > "Warning: Supplied argument is not a valid MySQL result resource in > /home/restricted/home/papagaiodigital/public_html/recrutamento/includes/clas > sesql.inc on line 22" > > line 22 is "$this->numrows = mysql_num_rows($this->resultado);" > > what's the problem?? > > Thank's n advance > > Rodrigo Peres > -- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] "simulate" form submission
Hi, Does someone know how to "simulate" a form submission? I guess I need to do something like header("Location: http://www.mysite.com";); header($PostVarsData); where $PostVarsData must contains the header informations to send the post vars but what are these header informations? how can I handle that? Thanks, Pascal