RE: [PHP] Dynamic refresh dropdown list
Look for AJAX ! DS -Original Message- From: C.R.Vegelin [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 17, 2007 12:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Dynamic refresh dropdown list I have a selection form with multiple dropdown lists, let's say A, B and C. If the dropdown list B is changed, then dropdown list C should be updated. To get this done, I use a small javascript function reload(form) { var val=form.B.options[form.B.options.selectedIndex].value; self.location='myForm.php?B=' + val ; } called by select id=B name=B onChange=reload(this.form); This works fine, BUT all other dropdown lists are also reset. So if I select another A, then another B, then also A is reset to its prior value. Any idea how I can refresh a specific dropdown, without affecting all the other dropdowns ? TIA, Cor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ?
Hi, In this case I usually creating Iframe with zero with and zero height and using your header code in the iframe sorce file. DS -Original Message- From: Matthew Pegg [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 7:59 AM To: php-general@lists.php.net Subject: [PHP] PHP/Mysql: Making binary field available for download - extra browser window ? Hi all, Working on a PHP script at the moment where I want to be able to extract a file (PDF file) from a mysql database and force the popup of the File Download dialog, to allow the user to either save or open the document (ie. and bypass loading the file using the browser's plugin) I've found solutions on the net for doing this with a file using readfile() but if I can get away with it, I don't want to create temporary files... Here's what I've got so far (truncated...): ? .. // db query string extract the PDF file $result = mysql_query(select file_data from brochure where id=1,$connection); $row= mysql_fetch_array($result); $lengths = mysql_fetch_lengths($result); // Grab the file contents as returned from the db $pdf_brochure = $row[file_data]; // setup headers to force download of $pdf_brochure into crap.pdf header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header(Cache-Control: private,false); // required for certain browsers header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=\crap.pdf\; ); header(Content-Transfer-Encoding: binary); header(Content-Length: . $lengths[0]); // send the file to stdout print $pdf_brochure;// problem might be here exit(); ? This almost works but the problem is that this code still spawns a new empty browser window, and I don't know how to prevent this Can anyone help ? regards, Matt. -- ___ Matt Pegg IT Specialist Abacus Business Machines Ballarat, Australia. ___ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session
Solved !!! THX everybody !! Problem was in php.ini file session section DS -Original Message- From: Ford, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 2:18 PM To: php-general@lists.php.net Subject: RE: [PHP] session On 26 April 2006 15:02, chris smith wrote: Can you explicitly pass the sessionid across: FRAMESET rows=100, 200 FRAME src=blah1.php?session_id=?php echo SID; ? FRAME src=blah2.php?session_id=?php echo SID; ? /FRAMESET ? That technique may or may not be the solution, but if it is it should be simply: FRAME src=blah1.php??php echo SID; ? FRAME src=blah2.php??php echo SID; ? This is precisely what the SID constant is provided for, and as such it contains the entire session_name=session_id string. As a bonus, it's defined as the null string when the session id is being propagated in a cookie, so it can be included unconditionally where needed. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- 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] session
Hi there !! I have web app which using frames. After session timeout my session is killed. The problem is that session is killed even when I doing requests to the server. I know why (session is chain to the frameset page) but what's the solution for this? I have to use frames !! Don't ask why !! :-) THX Dan
RE: [PHP] session
Here is application flow Index.php = login page, I need to start session here. From here (successful login) I'm going to admin.php which is Frameset page with source pages. DS -Original Message- From: chris smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 4:02 PM To: Sichta, Daniel Cc: php-general@lists.php.net Subject: Re: [PHP] session On 4/26/06, Sichta, Daniel [EMAIL PROTECTED] wrote: -Original Message- From: chris smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 2:18 PM To: Sichta, Daniel Cc: php-general@lists.php.net Subject: Re: [PHP] session On 4/26/06, Sichta, Daniel [EMAIL PROTECTED] wrote: Hi there !! I have web app which using frames. After session timeout my session is killed. The problem is that session is killed even when I doing requests to the server. I know why (session is chain to the frameset page) but what's the solution for this? Do you have session_start at the top of every page? A:Yes I do ! Does it happen on certain pages? A:On every page !! Does it happen when you perform a particular action? A:No !! On any action We need a lot more info about what's going on. A: I have declared framesets in index.php and after that I'm sending request from frameset source pages. This is (IMHO) Where's the rest of the sentence? Always CC the list. You will get more people looking at your questions/answers and you will most likely get a quicker response. Can you explicitly pass the sessionid across: FRAMESET rows=100, 200 FRAME src=blah1.php?session_id=?php echo SID; ? FRAME src=blah2.php?session_id=?php echo SID; ? /FRAMESET ? Sounds like you're missing something really basic if you're having issues with every page. Post some code in pastebin.com and send us the url so we can see what you're doing.. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session
Login.php ? // starting session here require_once(include/init.inc); ? table height=100% width=100% align=center cellpadding=2 cellspacing=0 tr td align=rightUser/td tdinput type=text name=loginUser/td /tr tr td align=rightPasswrod/td tdinput type=password name=loginPassword/td /tr tr td/td tdinput type=submit name=submit value=?=$login[login_submit];?/td /tr /table Login.php ? // starting session here require_once(include/init.inc); Here is code for checking user and password And if is ok do this ? script type=text/javascript language=javascript window.location.href = admin.php; /script ? } Admin.php ? require_once(include/init.inc); require_once(include/check.inc); ? html frameset framespacing=0 border=false frameborder=0 cols=180,* frame name=tree src=menu.php frameborder=0 marginwidth=0 marginheight=0 framespacing=0 scrolling=no noresize frame name=master src=blank.html frameborder=0 marginwidth=0 marginheight=0 framespacing=0 scrolling=auto noresize /frameset noframes body bgcolor=#FF brbrcenter h1No Frames!/h1 h4No frames in your browser!/h4 /center/body /noframes /html And for example in menu.php I'm using require_once(include/init.inc); DS -Original Message- From: chris smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 26, 2006 4:10 PM To: Sichta, Daniel Cc: php-general@lists.php.net Subject: Re: [PHP] session On 4/27/06, Sichta, Daniel [EMAIL PROTECTED] wrote: Here is application flow Index.php = login page, I need to start session here. From here (successful login) I'm going to admin.php which is Frameset page with source pages. That's nice.. but doesn't help us. We need to see code. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] preg_slipt
Hi all !!! I have string like this 1234567890 I need to split this into array like this a[0] = 12 a[1] = 34 a[2] = 56 a[3] = 78 a[4] = 90 I know that for this is preg_split, but I don't know the string patern for split. Thank you in advance !! Dan
[PHP] PHP and DataSet from C# (VB)
Hi there !! Is there a way how can PHP can handle data (get data ) from DataSet generated from dll buld in C# ? I have dll which is whole database layer and I need to retrieve data in php. THX Ing. Daniel ichta Siemens Program and System Engineering s.r.o. EIF AS TIS Bytick 2 01001 ilina SLOVENSKO Tel.: +421(41) 505 5889 Fax: +421(41) 505 5809 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.siemens-pse.sk/
RE: [PHP] passwd protected page
Hi, You can validate user on login page and sets the flag in database table. Then on each page you have to check that flag again DS -Original Message- From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 8:52 AM To: [EMAIL PROTECTED] Subject: [PHP] passwd protected page Hi, Without using sessions , how can I create passwd protected pages in mysql/php. I need to remember the user from login page and validate this user in other pages. Thanks, Bibhas -- 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] Validating user input
Another way is to do it on client side (javascript) DS -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 11:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Validating user input Hi, I am creating a timesheet application, how can I make sure that a user has entered a number, and that the number is a whole number or a decimal up to 2 places, and that the number is less than 24? Thanks for your help -- 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] downloading XML file
Hi, cfg: php 4.2.3, IIS5.1 I have generated link (from MySQL database) on my web sile, which suppose to allow user to dowload xml file. How can I do this because when I'm just adding name of the file to the href then it will be open in Browser window. How can I make the browser open the oepn or save dialog window ? THX PS: I think it has something to do with html header !! Ing. Daniel ichta EIF AS TIS Siemens Program and System Engineering s.r.o. Bytick 2 010 01 ilina tel.: +421 41 505 5889 fax: +421 41 505 5809 mailto:[EMAIL PROTECTED] http://www.swh.sk/ ICQ:84700861 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to question.
Hi, You can build some class which will hold some data and then you just need to sets all class variables and register instance of this class to the session variable. DS -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 11:37 AM To: [EMAIL PROTECTED] Subject: [PHP] How to question. Hi, I am a little confused with something that I am trying to implement (if you want to see the code tell me, but its pretty simple so i dont think you will need to) heres the idea, I want the client to be able to save up his choice into his account eg: his choice is 5 records (which transalates to me just saving the sql for those 5 records into his account) heres my problem, I am trying to make it so that if he tries to save his 5 records and he has not already logged in, he should be presented with the login page (have done this via sessions) *BUT* after he logs in he does not have to pick the 5 records all over again, it should remember his 5 records and automatically put it in. eg: 1.guy come to site and picks 5 records (he is not logged in) 2. gets redirected to the login page (but his 5 records or the sql for the five records are savedhow i dont know) 3.he logs in and the sql is entered into his accounts database for use later on. Sorry if that sounded confusing but if you get what i am trying to say you will see that its not really. Thanks for your help, -Ryan -- 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] Variables don't pass... *sniff*
I think, you can write some wrapper arround this and in some config file just add one variable which will tell the script about PHP version. so You can than use something like this: switch (VERSION) { case 4.0: .. } DS -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 1:47 PM To: Leif K-Brooks; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Variables don't pass... *sniff* [snip] To maintain absolute compatibility, just use $HTTP_GET_VARS. It's availalable in all PHP versions, just deprectaed in versions here $_GET is available. [/snip] Just to be perfectly clear on this. Let's say that I am writing an application that I am going to release to the public (for free of course!). In order that the application be as compatible with the many installed versions of PHP as possible I should always use $HTTP_GET_VARS or $HTTP_POST_VARS ? Or is there a point at which the formation of the variable call changes (like the $_GET and $_POST in the latest versions)? If there is a point at which it changes how can I account for that in code, other than telling the potential use that you must be running PHP 4.x.x? Thanks! Jay -- 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