Re: [PHP-WIN] php and silverlight

2009-11-19 Thread Jarrett Meyer
t the way Flash out-of-browser application can. -- Jarrett Meyer Email: jarrettme...@gmail.com Web: JarrettMeyer.com On Thu, Nov 19, 2009 at 4:33 PM, Harpreet wrote: > OK so I can create a silverlight web app use a datagrid ..populate it > with my sql server database ...compile it and em

Re: [PHP-WIN] php and silverlight

2009-11-18 Thread Jarrett Meyer
As far of the silverlight side of things, I've done an example (using ASP.NET MVC) that uses basic WebRequest and WebResponse objects. This version used JSON serialization, but XML is a little bit easier. http://www.jarrettmeyer.com/2009/04/creating-fake-services-with-mvc.html -- Jarrett

Re: [PHP-WIN] php and silverlight

2009-11-18 Thread Jarrett Meyer
. -- Jarrett Meyer Email: jarrettme...@gmail.com Web: JarrettMeyer.com On Wed, Nov 18, 2009 at 11:35 AM, Harpreet wrote: > I am trying to embed a silverlgiht project into php and like to use some > sql server data to display in the silverlight project. What is the best > way to g

Re: [PHP-WIN] Sessions Question!

2008-05-12 Thread Jarrett Meyer
. > > > > > > //Unset all of the global variables! > > > session_unset; > > > > > > //Destroy the session > > > session_destroy(); > > > > > > > > I would suggest also clearing the browsers cache. > > > > > &

Re: [PHP-WIN] Question about Sessions!

2008-04-23 Thread Jarrett Meyer
http://us3.php.net/manual/en/ref.session.php When you create the session, add your own variable called $_SESSION["last_page_load_time"]. if ($_SESSION["last_page_load_time"] < time() - 20 * 60) { // don't time out, keep the session going... $_SESSION["last_page_load_time"] = ti

Re: [PHP-WIN] Upload Files!

2008-04-15 Thread Jarrett Meyer
Files and all associated properties are saved in the $_FILES[] variable. From here, you can get the file name, file size, etc. I would recommend that you come up with your own name for the file. My code may not be right, but it will be close. $LocalFilePath = /path/to/local/files/ $LocalFileN

Re: [PHP-WIN] need help! plz

2008-03-24 Thread Jarrett Meyer
You can't call the header after you've sent output to the client (i.e. the 'echo' statement). Redirect first, then check the mail state, stored as a session variable or something similar. Hooman Fatoorehchi wrote: dear all, I want to make a form-to-email page and I want to diplay a messageb

Re: [PHP-WIN] Re: What's the difference between and ???

2008-02-18 Thread Jarrett Meyer
In your php.ini, if you want to work, you need to turn on "short tags". However, it is better to write long-tag compliant code in the first place. However, going through and editing that much code can be a bit of a bother. friso wrote: all I know is that are not XML compliant and you are adv

Re: [PHP-WIN] Strange error in a very simple PHP file

2008-01-10 Thread Jarrett Meyer
;btnGo" value="Go" /> ---end of source--- Like I said, the line it seems to reckon the problem is on is that very last line, but it makes sense that the PHP renderer engine thinks it's just missing something by then - who knows... Thanks in advance Jacob Kruge

Re: [PHP-WIN] Strange error in a very simple PHP file

2008-01-10 Thread Jarrett Meyer
In my experience, it probably means that you're missing a closing brace or the semicolon on the very last line of PHP code. Jacob Kruger wrote: In a very simple .php file where you're basically supposed to enter a password to then log-on to the backend of a site, I'm getting a very strange err

Re: [PHP-WIN]

2007-12-14 Thread Jarrett Meyer
Needs to turn on short tags in the configuration. Robert Van Kleeck wrote: The subject line says it all. The host of my website just migrated servers after the original one died. After installing PHP for windows, none of my pages worked correctly. After going through the code, it turned out

Re: [PHP-WIN] Wamp/XAMPP and phpmyadmin

2007-08-08 Thread Jarrett Meyer
PHPMyAdmin is a MySQL administrator interface written in PHP. It can help you build queries that you cut/paste into existing PHP code. For what you actually do with that query, you'll need to write some real PHP. PHPMyAdmin will not hold you back in terms of learning PHP. It will eliminate the n

Re: [PHP-WIN] Arrays past to functions

2007-07-27 Thread Jarrett Meyer
You don't really need an array here. function ComputeSalesTax($Amt, $State) { switch ($State) { case "CA": $tax = 1.05; break; case "WA": $tax = 1.07; break; // etc. default: $tax = false; }

Re: [PHP-WIN] PHP can't find the php.ini file

2007-06-25 Thread Jarrett Meyer
Do you restart your Apache server after making a change to php.ini? -- Jarrett M. T. Meyer http://jarrettmeyer.blogspot.com http://www.jarrettmeyer.com - Original Message From: Don Denton <[EMAIL PROTECTED]> To: php-windows@lists.php.net Sent: Monday, June 25, 2007 3:04:44 PM Subject: R

Re: [PHP-WIN] Translation of html?

2007-06-18 Thread Jarrett Meyer
Hack: Explode on "<" will give you : h1>This is a title /h1> table> tr> td>test /td> /tr> /table> Explode on ">", and only keep the second entry in the array. Would that work? Jarrett M. T. Meyer http://jarrettmeyer.blogspot.com http://www.jarrettmeyer.com No trees were harmed during this

Re: [PHP-WIN] Retrieve all SESSION variables.

2007-05-25 Thread Jarrett Meyer
I think Stut is being a little sarcastic. :) The original question is correct: The method below ( foreach ($_SESSION as $k => $v) ... ) will only tell you the current session variables for the current user. That is intentional in the design of the $_SESSION variable. It will not tell you all of t

Re: [PHP-WIN] spam-attempts at certain domain - what to do.

2007-05-15 Thread Jarrett Meyer
k? You may want to search for it, and see what you find. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this transmission; however, several electrons were terribly inconvenienced. - Original Message From: Bill Bolte <[EMAIL PROTECTED]> To:

Re: [PHP-WIN] $date1 larger then current date?

2007-04-24 Thread Jarrett Meyer
sDate) and TimestampToOsDate(Timestamp)) that seem to get called a LOT. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this transmission; however, several electrons were terribly inconvenienced. - Original Message From: Gustav Wiberg <[EMAIL

Re: [PHP-WIN] Calling PHP from PHP

2007-04-12 Thread Jarrett Meyer
header("Location:next-script.php"); would work as long as nothing has been written to the screen. You can write to a DB, a cookie, a session, a file, etc, though to keep data flowing. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this tr

Re: [PHP-WIN] How to read the username

2007-04-07 Thread Jarrett Meyer
Sam, Sorry to disappoint you, but this is also a client-side value, not a server-side value. You can't get to it. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this transmission; however, several electrons were terribly inconvenienced. - Ori

Re: [PHP-WIN] duplicate entry

2007-04-05 Thread Jarrett Meyer
answers that can be solved from your end without involving the client. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this transmission; however, several electrons were terribly inconvenienced. - Original Message From: sam rumaizan <[EMAIL PROTEC

Re: [PHP-WIN] duplicate entry

2007-04-05 Thread Jarrett Meyer
nsert. Using linked relations and keys is your friend, as long as you have a database that supports these utilities. Thank you, Jarrett Meyer http://jarrettmeyer.blogspot.com No trees were harmed during this transmission; however, several electrons were terribly inconvenienced. - Original Me

Re: [PHP-WIN] PHP rendering

2007-02-09 Thread Jarrett Meyer
You may want to try a few things. (1) All queries are run inside functions. I don't do any work inside (2) These functions are always called from a wrapper function, which includes reporting the time to run just the query. GetOrderNumber(MyOrderNumber, &$DS_Order) { global $QueryTimers;

[PHP-WIN] Visual Studio and PHP

2007-02-02 Thread Jarrett Meyer
To: PHP Windows List Is it possible to compose PHP using MS Visual Studio? If so, what additional tools/installs are required? Can you please point me in the right direction? I know that I *could* use Zend Developer Studio, but I'm already a big fan of VS, and I wouldn't have to pay for and lea

Re: [PHP-WIN] Back button in PHP

2007-02-01 Thread Jarrett Meyer
$_SERVER["HTTP_REFERER"] is the previous page provided that the user got to the current page by following a link. This can be spoofed, so it isn't perfect. - Original Message From: Alf Stockton <[EMAIL PROTECTED]> To: php windows Sent: Thursday, February 1, 2007 8:59:23 AM Subject: [PH