How to run web PHPscript in specified user? Programming Web Development by michael123 How to run web PHPscript in specified user, not in apache(default). In linux you … Re: javascript not interpreting php return variable Programming Web Development by UncleJoe …'pars' parameter is getting to php successfully, and the phpScript returns a value successfully, evidenced by the alert() function. …I'm sending the dropped divID, 'draggable.id', to 'phpScript.php' for processing, then I want to return a […order- 1) Send dropped divID to phpScript.php 2) Return new divID from phpScript 3) Set display:yes for divID… javascript not interpreting php return variable Programming Web Development by UncleJoe … pass the variable as an argument it isn't working... phpScript.php- [code=php] <?php print $divID; ?> [/code] [code…=javascript] function onDropEvent(draggable,droparea){ var url="phpScript.php"; var rand = Math.random(9999); var pars = 'divID… Re: javascript not interpreting php return variable Programming Web Development by Airshow … the variable [ICODE]elid[/ICODE]. Either the value returned by phpScript.php is wrong (it may just need trimming) or it… display image in center position using php header function Programming Web Development by saiprem … that filename and displays the file to the browser using phpscript. for this I used [code=php] header('Content-Disposition: inline… Image upload form not working Programming Web Development by bwallace …] <form enctype=="multipart/form-data" action="phpscript.php" method="post"> <input type… Random link script Programming Web Development by smackthat9876 … mouse over the image, something like this: http //mysite com/phpscript?d=www.site.com/thread/217.html (I don't… Re: Random link script Programming Web Development by smackthat9876 >Newbie poster http //mysite com/phpscript.php?d=www.site.com/thread/217.html Ok, but … Re: Random link script Programming Web Development by smackthat9876 … right direction by telling me how to call a local phpscript.php?variables, and a couple things.. Yeah you make me… ph Programming Web Development by murugami eric hi guys, am working on a phpscript and have a date form, am lacking a php/javascript code to validate my date form. please help with the code. Re: Email piping to script problem Programming Web Development by digital-ether … a copy mail('myemail@mydomain.com', 'email received', $email, 'from: phpscript@mydomain.com'); // clean the output ob_end_flush(); ?>[/PHP] Another way… Re: execute behind the scene mysql update/insert query just on button click Programming Web Development by nav33n …, for example, set a variable &ajax=true. In your phpscript, check if $_GET['ajax'] is set and its true. If… Re: plzzz...help...upload & displaying image Programming Web Development by kvprajapati If $product_image variable represent a path of image file then write following statement: [CODE=PHPScript] .... echo "<td><center><img src=\"$product_image\" /></center></td>"; .... [/CODE] Re: Input to URL Programming Web Development by mschroeder ….5 functionality. [CODE] var jqxhr = $.getJSON("path/to/your/phpscript.php", { headline : "This is my test headline!"… Re: How to run web PHPscript in specified user? Programming Web Development by Troy michael123, since nobody has replied, I thought I might just answer to let you know that I struggled with how to run PHP apps with root privs WHEN NEEDED or to run as specific users. I'm trying to recall all the brick walls I ran into, but seems a major one was that I'd have to switch over to using PHP in CGI mode rather than as an Apache module. … Re: javascript not interpreting php return variable Programming Web Development by essential Hi UncleJoe, I am not quite familiar on using this frameworks. But i suspect, the problem could be on **line #5**, in your code: var myAjax = new Ajax.Request( url, { method : 'get', // Try to provide object reference onto this label(pars). pars : pars, // (OBJECT REFERENCE)?, onComplete : showID // How do you pass … Re: javascript not interpreting php return variable Programming Web Development by essential Preserving what we already have, let's try this and see if things will work: [code]var new Ajax.Request( url, { method : 'get', // Try to provide object reference onto this label(pars). pars, onComplete : [color=red]function() {[/color] showID(myAjax); [color=red]}[/color] } );[/code] hope it helps and hi to [b]Airshow[/b] Re: javascript not interpreting php return variable Programming Web Development by UncleJoe Thanks for the reply Airshow. I double checked the scripts. The return from php is an existing div ID, verified by: alert(newVar); 'elid' is the same div ID verified by alert(elid); The div ID I'm testing is hardcoded in php to return, so PHP drops out of the equation. Finally, the div ID exists, verified by 'view source'. Still no value for … Re: javascript not interpreting php return variable Programming Web Development by UncleJoe [QUOTE=essential;915816]Preserving what we already have, let's try this and see if things will work: [code]var new Ajax.Request( url, { method : 'get', // Try to provide object reference onto this label(pars). pars, onComplete : [color=red]function() {[/color] showID(myAjax); [color=red]}[/color] } );[/code] hope it helps and hi to [b]… Re: javascript not interpreting php return variable Programming Web Development by Airshow UJ, Burried in my post above is a suggestion that the returned divID might need to be stripped. ie. it may have leading/trailing white space that doesn't show up in a javascript alert. You can test the theory with alert(divID.length). See if it reports the expected number of characters. If this turns out to be the problem then you can do … Re: javascript not interpreting php return variable Programming Web Development by essential Try this with your [icode]toggle(arg)[/icode] function: [code]function toggle( elid ) { elid = elid.replace(/[\s\n]+/g, ""); var cdiv = (( document.getElementById ) ? document.getElementsByTagName("*") : (( document.all && !document.getElementById ) ? document.documentElement.all : null )); var elem = … Re: javascript not interpreting php return variable Programming Web Development by UncleJoe [QUOTE=Airshow;916825]UJ, Burried in my post above is a suggestion that the returned divID might need to be stripped. ie. it may have leading/trailing white space that doesn't show up in a javascript alert. You can test the theory with alert(divID.length). See if it reports the expected number of characters. [/QUOTE] BINGO!!!! I … Re: javascript not interpreting php return variable Programming Web Development by UncleJoe Essential- Thanks for the test script. We've discovered that there are too many characters in 'elid'- its somewhere in this thread. I'm putting your script into toggle to see what the returns are. I appreciate all your help with this. I'm always interested to look at other peoples functions- its amazing what I can learn from … Re: javascript not interpreting php return variable Programming Web Development by UncleJoe It works!!! I added a prototype [CODE=javascript] String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } [/CODE] using: [CODE=javascript] var output = input.trim(); [/CODE] The divID is parsed properly in the argument. Thanks a bunch Essential and Airshow, you have saved the day! Re: javascript not interpreting php return variable Programming Web Development by essential Here's a more versatile code: [code]function toggle( elid ) { elid = elid.replace(/\s+/i, ""); var testMSG = ""; var validID; var ids = [ ]; cdiv = (( document.getElementById ) ? document.getElementsByTagName( "*" ) : document.all ); for ( var x = 0; x < cdiv.length; x++ ) { if ( … Re: javascript not interpreting php return variable Programming Web Development by Airshow UJ, With [ICODE]exit[/ICODE] doing its thing, I would guess you've got a leading carriage return from somewhere higher up the page. They can creep in if the source code dances <? in and ?> out of php. And check that the opening <? is hard against the top of the file. Alternatively ..... I'm not sure which style of line feed it might… Re: javascript not interpreting php return variable Programming Web Development by Airshow I just read the thread through and spotted UJ's post #12. I must have been a bit bleary-eyed yesterday morning. Ignore my ramblings above. I'm sure that String.prototype.trim is the way to go. [B]Airshow[/B] Re: javascript not interpreting php return variable Programming Web Development by UncleJoe Thanks a bunch for your efforts. Re: Image upload form not working Programming Web Development by somedude3488 Notice the "==" besides the enctype attribute. I would also remove the brackets "[]" from the name. Re: Image upload form not working Programming Web Development by bwallace keith, thanks for the good eye regarding the "=="! I also changed the destination from "http://mydomain.com/uploads/" to basically "home/user/public_html/uploads/" and added bracketed numbers to the end of $_FILES. For example, $_FILES["uploadedfile"]["tmp_name"][0] and $_FILES["uploadedfile&…