$details is an array (just like $company_name was). Try to view
print_r($details); and see what you get.
---John Holmes...
- Original Message -
From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 28, 2003 3:18 PM
Subject: [PHP] Store array as Se
> * Thus wrote 386-DX ([EMAIL PROTECTED]):
> > Hello. Let's say I have something like this:
> >
> > function aa($test) {
> > $a = 8;
> > echo $test;
> > }
> >
> > $a = 2;
> > aa("a is ". ($a>5?"greater":"equal to or less"). " than 5".);
>
> http://php.net/eval
No... you need to make $a glo
> Another stupid newbie question...(btw, is there a list more geared towards
> the newbies?)
Yes, it's called the manual.
> Is the file_put_contents() function not available in PHP 4.3.2?
Seriously: www.php.net/file_put_contents
---John Holmes...
--
PHP General Mailing List (http://www.php.n
From: "Lee Stewart" <[EMAIL PROTECTED]>
> I'm moving an application that I'm in the trying to move to a new
> platform. It was running fine on an older Linux platform with PHP
> 4.0.3 and Apache 1.3.14. The new platform is also Linux, with PHP 4.2.2
> and Apache 1.2.26 -- with register_globals o
> How can I easiest rewrite A and IMG tags? I'm fetching a page with
> fsockopen() and I need to rewrite these tags before sending it on to a
user.
>
> My own theory is that it's made with Regular Expressions. I just don't
> know these myself.
If you're writing one of those "anonymous" browsing pr
> Let's say I have a number: 1281924
>
> The rules call for removing "1280+", meaning remove 128 and all 0's that
> come after it, until you run into another number.
>
> In the end, it would leave 1924, and everything else on the beginning
would
> be gone.
$new_number = preg_replace('/^1280+/'
> Subject: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru)
I hope there are job postings like this if/when I get out of the Army! :)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Take out the plus sign... type != 'Meal Plans'
And using single quotes in your query might make things easier (no
escaping...)
$dbqueryshipping1 = "select * from tempuserpurchase where
usersessionid='$User_Shopping_Id' and day='1' and type!='Meal Plans'";
You don't need quotes around '1' since i
From: "Beauford.2005" <[EMAIL PROTECTED]>
> Yes, I'm still screwing around with this stupid redirection thing, and
> either I'm just a total idiot or there are some serious problems with
> PHP. I have now tried to do it another way and - yes - you guessed it.
> It does not work.
>
> I mean really,
From: "Curt Zirzow" <[EMAIL PROTECTED]>
> * Thus wrote James Hatridge ([EMAIL PROTECTED]):
> > I've got a search page written for my web site. I can find the html page
I
> > want by keyword. Now I need to get the title of that page in to a
variable.
> > In other words I have a file name, for exampl
> When registered globals is set to off this does not effect the $PHP_SELF
> variable right? In other words I should be able to call $PHP_SELF with
> out having to do this $_SERVER['PHP_SELF'], right?
No. With register_globals OFF, $PHP_SELF is not set.
---John Holmes...
--
PHP General Mailin
From: "Jeff Stillwall" <[EMAIL PROTECTED]>
>
> Now I'm (possibly) getting somewhere:
>
> When I modify the function to be this (notice the key name change by
adding
> "s"):
>
> function setupUserEnv ($userArray) {
>
> $_SESSION['loggedIn'] = 1;
>
> foreach($userArray as $key=>$value) {
>
From: "Jennifer Goodie" <[EMAIL PROTECTED]>
> > ! am trying to count the number of items in this table. The table
> > has one field in it.
> >
> > The code I am using is:
> >
> > $dbquerymeal = "select COUNT(*) from mealtype";
> > $resultmeal = mysql_db_query($dbname,$dbqueryshipping1);
> > if(mysq
Quit spamming us. We don't want to visit your lousy poker site.
---John Holmes...
- Original Message -
From: "Rausch Alexandru" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 22, 2003 4:42 AM
Subject: [PHP] Hi
MYSQL problems problems.
I want to install an user login ap
> I have a form that has a select form object with where I can select
multiple
> values. The select is called "number". When I post the form, I get a lot
> of variables called $number with the various values I selected. Is there
a
> way that I can make this an array of values?
name it "number[]
> In my first post I showed that one of the versions of the logout page
> that I used had this line in it.
>
> setcookie("user_info","",(time()-3600),"/");
>
> Shouldn't that take care of the cookie?
Like someone else said, that'll take care of a cookie called "user_info".
Your session cookie is n
> I have 7 checkboxes, which make up the array information. I currently use
> implode to make the array, however that array only consists of the
> information that it checked.
>
> What I need to do now is make it so the array will always be 7 items, but
if
> there isnt a checkbox for the item, I wa
> What is the point of having a unique ID for each session if the only
> thing that matters is the data stored within it? Why have a session id
> at all if it can't be used to uniquely track a user?
Well, it can, and it does. I guess it's all in how you use it. If my session
id is "abcd", then whe
> I have an upload form that will be used for some really large files. I
need to ask a couple of questions about the ways of improving the success
rate that I have using it.
>
> (1) what is the best and most stable method for uploading a large file.
Sometimes the transfer peters out.
>
> (2) how ca
From: "Chris W. Parker" <[EMAIL PROTECTED]>
> > CPT John W. Holmes <mailto:[EMAIL PROTECTED]>
> > on Monday, July 21, 2003 12:39 PM said:
> >
> > You should still consider the user logged out since the
> > session is empty, right?
>
>
You have the same session id, but there is no data in it, so what's the
problem? You should still consider the user logged out since the session is
empty, right?
If you really want, upon logout, make a new session id with session_id(),
md5() and uniqid().
---John Holmes...
- Original Message
> --- Andrei Verovski <[EMAIL PROTECTED]> wrote:
> > I am need to pass serialized assotiative array via form hidden
> > field (not GET or POST).
>
> This is impossible. A hidden form field is simply a form field that is not
> displayed to the user. Form actions must be GET or POST.
>
> > In order t
> hi, i'm trying to select * through 3 tables - is the following syntax
correct?
>
> $sql="(SELECT * FROM mjp_cc)";
> $sql="UNION";
> $sql="(SELECT * FROM imc_cc)";
> $sql="UNION";
> $sql="(SELECT * FROM pmp_cc)";
> $sql.=" ORDER BY savedccactivity DESC";
>
> i basically just want to spit out the c
I think you need to make a second index that just consists of the one column
ALTER TABLE biblio ADD FULLTEXT (title)
if you want to search on just that one column.
---John Holmes...
- Original Message -
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, Ju
From: "Reuben D. Budiardja" <[EMAIL PROTECTED]>
>
> This is a hypothetical situation. The real situation is that I am trying
to
> have a protocol for data sent by client using Flash. But the basic
question
> remains.
So FLASH is creating the string that you must decode in PHP? Is there any
way to
> On Friday 18 July 2003 02:42 pm, Chris Shiflett wrote:
> > --- "Reuben D. Budiardja" <[EMAIL PROTECTED]> wrote:
> > > Suppose I have a long string like
> > > $myStr = "$string1:$string2:$string3";
> > >
> > > I can obviously explode them using ":" as the separator. But what if
> > > $string1 cont
> Ok, I want to specify who the mail is coming from by using the
sendmail_path
> option in the PHP.ini. I've added the [EMAIL PROTECTED] to it, but I want
> to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
> whatever else. Anyone have any ideas how I can do this? I'm pu
> Ok, before you go responding with percentages, I should note this.
>
> consider this:
> Image1 : 100x100 (Ratio = 1:1)
> Image2 : 100x200 (Ratio = 1:2)
>
> Space available for display : 75x75
>
> now, i can say "width=75% height=75%", but this will
> only work for Image1, since Image2 will end
> Angelo Zanetti napsal(a):
>
> > Anyone know where I can download a demo point-of-sale program from?
preferably written in php and preferably a point-of-sale designed for
restaurants? any links etc will be great
>
>
> This problem (POS) is too serious to be written in PHP(via browser).
> Maybe in
> Artoo wrote:
> > How do you repost data in a textarea field of a form? I've set up a
session
> > variable named old_data and want to repost the data into the textarea of
a
> > form so it can be re-editied.
>
> You can use the $_POST variavle in the text area
>
> eg
>
>
You should run htmlentit
> You'll be waiting a long time, until the end of time :)
> Because the php4 module is now named php-src, so change
> that in the url and you'll be set.
Thanks. Someone needs to change the link in the Configuration chapter of the
manual, too, b/c that's how I always find it. :)
---John Holmes...
> Any ideas on how I can print the lines of my file in reverse order,
> then? Does fgets() always process from the beginning of the file even
> if you open the file with the pointer at the end? I tried to get the
> line count of the file and go through each line of the file backwards
> but that d
> Is there any php function to pull a query into an array? I know there is
a
> way to get the first row of the results in an array, but I'm having to
loop
> through each row pushing the row onto an array to get the result I'm
looking
> for and it seems like a lot of code for something that I would
> Well here is some more information so you can understand what I am
> trying to do:
>
> I need to display their username in html/php document. This document has
> a form which they fill out. It is to stop people changing who they are
> when they fill out the form (for example joe bloggs filling ou
> Everything I try I get "undefined index" what does this mean? It is
> vital also that I can grab the user and the pass before somebody can
> access a certain part of the website, like the authentication dialogs
> that appear in Internet Explorer.
Like Lief said, it's $_SERVER['LOGON_USER']...
T
> CPT John W. Holmes wrote:
>
> >You can get the username, that's it.
> >
> >$_SESSION['LOGON_USER']
> >
> Don't you mean $_SERVER['LOGON_USER']?
Yeah :) See what I get for giving up caffeine...
---John Holmes...
--
PHP General
> I need to capture the username and password used to login to Windows
> 2000/XP with PHP. Does anybody know how to do this?
You can get the username, that's it.
$_SESSION['LOGON_USER']
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
From: "frank reeves" <[EMAIL PROTECTED]>
> I have an account on shared server and am trying to
> write a logfile (a dump of an email which i use mail()
> to send) to a logfile in my home dir. This logfile
> will grow with all emails send by my app and will thus
> give me an archive of sorts.
>
> H
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
> [snip]
> > I am running a red hat 9 linux box with Apache 1.3.27 with
> > PHP 4 what is
> >
> > the default location for the php.ini file
> [/snip]
>
> Create a page with just the following...
>
> phpinfo();
> ?>
>
> place
> Does anyone know if there are issues with using the header() function
inside
> frames? Is there extra stuff that needs to be added to it to get it to
work
> correctly?
No... each frame is it's own HTTP request. PHP operates server side so it
has no idea of "frames". It simply processes the code
> When I include in my html
> code, I get a parse error. The version is 4.1.2; phpinfo() reports
> that XML support is turned on. Can anyone help with this?
The first two characters are opening up a PHP block of code, so you get a
parse error. Either disable short open tags in php.ini, or use
";
> I have a question regarding retrieving the
> information. I have the functionlity in which on every
> user click, system needs to retrieve information for
> particular user and display the page according to the
> retrieved information. Now question is which is the
> scalable solution? (1) Retriev
> I try to include a redirect header in my script, but is fails with the
> familiar ( headers already sent) error.
>
> I KNOW you should put the headers call where it will cause the first
> output, and I do that, the only thing happening infront of the headers
> call is an include statement to my m
> Done a lot of Perl & PHP coding over the years and one thing I _really_
> liked about Perl is its 'use strict;' directive. For those of you not
> familiar with Perl, this made the script die if you don't (among other
> things) declare your variables before using them.
>
> Once the fingers are fl
> 1. How do you setup a cookie that will not expire??
You can't.
> 2. How do you put 2 items that you want to save in
> the cookie and retrieve?? Examples in the PHP manual
> only show how to work with a single value.
You can't. Use an array or two cookies.
---John Holmes...
--
PHP Gener
> Is there any way I could loop thru and print all the month names (i.e.
> January, February)?
Just make an array and loop through the array. You know the rest of the
names, right? :)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/
> I looked in the manual (twice now). I want to keep logging to the log
> file but print to browser on this one script.
>
> I have in my script:
> error_reporting (E_ALL);
> error_reporting (E_ERROR | E_WARNING | E_PARSE);
>
> but they're still only being logged to file. I dont have access to
>
> i am trying to send mail from a script, but i receive these error message:
>
> Warning: mail() [function.mail]: Failed to connect to mailserver at
> "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
> or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php o
> Can anyone tell me what is wrong with my PHP script? I am trying to add
> information to an MSSQL database from a separate HTM file. The script it
> as follows:
How about you tell us what the problem is? What is the result of this
script? What are you expecting the result to be? Take away the @
> Apache 2.0.40
> PHP 4.2.2
> Linux
>
> I have a single php script for downloading requested files. It works
> beautifully on http over port 80. It does NOT work at all over https on
> port 443. I am using the exact same script (the very same file) for both
> http and https connections. Apache
> setting up some pages to allow users to log in, and store their userID in
a
> session var.
> for development purposes, i've installed AMP on my windows box.
>
> -everything parses fine
> -register globals is on.
>
> problem: session vars do not seem to be carrying over pages, even when i
set
> th
> How do i generate a unique random number?
You can use rand(), but there's no guarantee it'll be unique unless you
remember every number you've ever generated
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> How do I trap a PHP error and display my own error message instead?
>
> I have two PHP scripts - one that creates tables on MSSQL and one that
> deletes tables on MSSQL. I wish to capture the message that appears if
> the user attempts to create tables that already exist, or delete ones
> that d
> try this:
>
> header("Content-type: image/jpeg");
> fopen ("d:/crushme/images/1.jpg", "r");
Just my opinion, but maybe you should try reading the file and echoing the
data instead of just opening it. :)
---John Holmes...
> I would like to pass an image throught
> http://server/newman/ImageTE
> I am new to PHP and am trying to get access to files that are uploaded.
> I have RTFM ;-) and have noticed that PHP writes the file to disk in a
> temporary location and provides a method/class with all of the
> information needed to access it. I am loading (PDF's) into a binary
> field in mySQL
> What is the best way to validate a "money" input? For example, 3452.67
> versus 3452..67.
if($value == (string)round((float)$value,2))
or
if(preg_match('/^[0-9]*\.?[0-9]+$/',$value))
appear to work. :) Assuming your value is a string to start with.
---John Holmes...
--
PHP General Maili
> >> LISA, in collaboration with Lemoine International has made "Software
> >> Testing and Internationalization" by Galileo Computing freely
> >> available for download.
> >> [snip]
> >> To download a copy, please visit
> >> http://www.lisa.org/interact/2003/swtestregister.html
> >
> >How about a
> Anyway, can any make a suggestion on how to connect to a c function from
> a php app?
>
> I have to connect to a sales tax calculation software. The function
> is being written for me but I have to figure how to call it - get the
> variable - and use it again in my php app.
>
> I've been told th
"nabil" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> when i use str_word_count() i got the following :
> Fatal error: Call to undefined function: str_word_count()
>
> and my PHP is Version 4.2.3
>
> What is the problem ???
Reading English?
us2.php.net/str_word_cou
> Does anyone know about the ideal session filesize
> limit? I am using the common functionality in the
> entire application. So i am thinking to store data
> into the session file once user logs into the system
> rather retrieving the information from database on
> each user request. But i dont kn
No, I'm all for a public flaming... let him serve as an example to others!!
:)
In all honesty, I have posted about the htmlentities/htmlspecialchars()
requirement when putting data in form inputs quite a lot recently. You
should have picked up on it sooner. :) Oh well, though... at least you know
> One of the coolest things I have seen online, and some of you may not even
> know this works, but if you type in the url: "http://www.php.net/foo";
> you'll be taken straight to the foo page of the php manual, if one exists.
> If "foo" doesn't exist, you pull up a Google search-within-the-site pa
> Is there a way to run a script (to check a table for new fields, or to
> check time..etc) evrey few hours, without using programes souch as
> crontab.
In addition to what others have said, you don't _have_ to set up the cron
job (or any scheduled job) on the same computer as your scripts. If you
> > array[numrooms] => Array ( [3] => 2 [2] => 5 [1] => 1 )
> > I want to get a result like this:
> > 2=>5
> > 3=>2
> > 1=>1
> > ( I want the keys to stay attached to the results)
>
> perhaps asort()?
> "This function sorts an array such that array indices maintain their
> correlation with the arr
> At 16:19 17-6-03, you wrote:
> >$sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';';
> >Like that?
> you missed some quotes:
> $sql = 'select * from db where apple = \''' . $_POST['foo'] . '\'"';
Go back and count the quotes again. The original post is correct as far as
quotes go.
> I need a really simple function that retrieves the actual page file name
> from a URL. So, if the URL is http://www.server.com/pagename.php, or if
> it is http://www.server.com/directory/pagename.php, the function in both
> cases will return "pagename.php".
>
> I'm sorry if this is a ridiculous
> I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with
> quotes in mysql inserts.
>
> However, I think I have run into a problem that might be related, and
> was wondering if there is an easy way to fix it:
>
> I have a script that gets user input from a drop-down, on the acti
>
> > Sorry, I donĀ“t know that you needed an effective snipet. And you are
> > right,
> > I only writed for positive integers. Try something like apply 2 type
cast
> > simunltaneous.
> >
> > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"])
> > echo "is int";
> >
>
>
> Why not just
Use stripslashes() to remove the slashes. Use htmlentities() on the text
before you put it into the , also.
---John Holmes...
- Original Message -
From: "Matt Palermo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 4:16 PM
Subject: [PHP] slash trouble when edi
> I am trying to create a very basic page where we can all easily work on a
> document. I just have a huge textarea that inserts the text into a
longtext
> field in the mysql db. I use nl2br to keep the formatting. Of course,
when
> the document is viewed in the textarea, all of the are there.
> I dont know how exactly to explain this but will do my best, i have many
of
> the following lines in a page:
>
> ="package" value="loco package">
> each line of course has a differient id[] value and package value.
>
> Everything is working fine with the just id[] value but now i need to add
> > -Original Message-
> > MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc
> >
> > Anyone know of articles/examples that specifically deal with this issue?
>
> Look into the Top() function for MSSQL. It goes something like:
>
> SELECT Top(10) * FROM table
>
> You sh
> I have a blob in the database. I want to open a file=BLOB in the browser
such
> a way as if I clicked on a link. So if it is pdf, its opened by pdf
plugin,
> if it is doc, it is open by word plugin, if it is zip the dialog for
> opening/saving to disk is opened, if it is jpeg it is directly displ
Agree 100%. Don't assume that just because you use JSP, or any other
language, your program is going to instantly "scale well" and be easy to
maintain. You can write crappy, inefficient code in any language. You can
also write good programs in most any language if you put the proper planning
into i
So does your code work? Here's a tip: Try a simple example, like what's in
the manual, and see which method works for you. If they both work, which one
do you understand? Use that one...
---John Holmes...
- Original Message -
From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]>
To: <[EMAI
> I want to have a textarea that contains details read from a mysql table,
> but I want to echo each row so that it is on a new line. What is the
> "new-line" character for a textarea? ( in effect the reverse of nl2br()
A newline is \n
$text = "word\nword\nword\n";
echo "$word";
will have each
> Just curious to know if anyone knows of a way of displaying a set of
> links on a page only when that page is loaded on my local development
> machine and not when it's loaded by the general internet public on my
> remote host's machine?
>
> I have several background content editing pages which
> > > $gd_loaded = (extension_loaded('gd'))?1:0;
> >
> > Well, this also fails the simple-as-possible test: if the value returned
by
> > extension_loaded() can be used to drive the ?: operator, it must be
> > evaluable as a Boolean; this means you can use it directly for later use
in
> > an if() or
> I am looking for a way to replace "." (=dot) to "," in a string with
either
> ereg_replace or preg_match . I read the manual in PHP on Pattern matching
> for preg_match but could not immediately trace it.
> All help appreciated.
If that's all you need to do, use str_replace().
---John Holmes...
> Can anyone teach me how to get the date
> and time from the web-server,it's not
> changed with the time of local machine.
> I found the date() cannot do this.
That's exactly what date() does... the date and time from the server. Maybe
you're using it wrong.
---John Holmes...
--
PHP General M
> I'm working on quite a large website with a lot of php pages.. And a lot
of
> includable functions (modules).. Sometimes one of those modules gets
> included twice accidently and then it generates an error .. of course..
This
> made me wonder of there's any way to prevent the function from being
> Need some help here. I have to format a line with each piece of the line
> being a fixed set of characters in length, wether its a mix of spaces and
> letters, or all letters. Here's an example of the line:
>
> 06?4111ABDALARM333 N COUNTRY CLUB CANTON
DD8
>
> In this fi
> Is there a way to check within an application if the "gd" library has
> been installed?
Maybe get_loaded_extensions()
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> When using PHP sessions, if the user's browser supports
> cookies, PHP sets the session id as a cookie (so far as I
> understand it). So when trying to use the session ID in a
> script, a cookie request is sent to the browser to get the ID
> and assigns it to the internal variable $PHPSESSID (ag
> I've been getting a warning on one of my scripts since I upgraded from
4.1.2
> to the most recent version of PHP. The warning is:
>
> Warning: setlocale(): Passing locale category name as string is
deprecated.
> Use the LC_* -constants instead
>
>
> The script at the line that is failing sez:
>
> From: "Randum Ian" <[EMAIL PROTECTED]>
> Why pay for something when you can get this for nowt! ;o)
I love getting things for nowt... like candy from a baby...
:)
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can also call the file through lynx or wget if you can't call the php
executable directly.
lynx --dump http://www.yourserver.com/file.php
wget http://www.yourserver.com/file.php
Down side is that the file has to be in your web root. Works great for
calling remote files, though.
---John Holme
> Thanks, its working fine now, actually a little better than I expected :-)
> Dont understand the logic though, if you find time point me to the correct
> place where i can read up and figure out the logic you used.
The logic isn't too hard. You're on page X. You show links to other pages
from X
> yeah .. I knew it .. but it would be so very helpfull if it would be just
> included in a superglobal similar to $_REQUEST ...
Do it yourself, if you must: array_merge()
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I've built a page that collects network card information, assigning each
> element its place within a $Card array, and all of the cards to $NetCards.
> As you enter your card information at the bottom, the previous card is
> displayed above it, with a Delete checkbox option at the end of that row
> I'm trying to build a news panel for my home page. Basically I want to
> present the five most recent news articles in a recordset, but I'm not
> sure how to cut off the recordset after 5.
> Also I want to present a picture with my first headline.
>
> My code will go something like this:
>
>
> On Tuesday 03 June 2003 13:58, Jay Blanchard wrote:
> > [snip]
> > We would have to see some code
> >
> > Jay
>
> I'm not able to reproduce this in a short code-snippet.
> But from the first echo to the last echo $lid change its value:
Either this is a bad cut and paste job or this script wi
> I have a value 178607, which is stored as seconds. I
> like to convert it (178607 Secs) to Hours, Minutes and
> Seconds appropiatly.
> Can anybody help me supplying the code?
If it's stored in MySQL, you can use SEC_TO_TIME()
mysql> select sec_to_time(178607);
+-+
| sec_to_t
> I'm getting strange behavior in some of my scripts
> I just upgraded from 4.3.1 to 4.3.2 and was hoping it would solve the
> problem. The problem is that variables changes its values from one line
og
> code to another - without specific code that should change the value.
> Do anybody else had t
> Simply trying to use regular expressions to validate a 5 or 5+4 zip code,
> excluding 0 and 0-. Looked on http://www.regexlib.com, and
> that's where I found the pattern below, but it doesn't work. The best I
can
> do on my own is two separate regular expressions, one to match a val
> Yes, no problem! Glad it worked out. you may wish to actually study the
> perlre man page on perl.com. This goes into the most details and talks
about
> how PERL actually EXTENDS shell regular expressions significantly and
> excellent resource that I have used many many times.
>
> I figure since
Add some debugging code. Are you sure 36 and 37 end up in the $array_id
array? Try printing out $_POST['idlist'] and $thisid as you loop through
this thing to figure out where/what is getting skipped.
Ditto the idea on doing this another, way, btw... :)
---John Holmes...
- Original Message -
Replying to myself... :)
> You have to check for it, regardless. See if this works for you.
>
> $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING']))
?
> $_SERVER['QUERY_STRING'] . '&' : '' ) . 'newVar=1';
>
> The middle part basically sees if the QUERY_STRING is empty. If it i
You have to check for it, regardless. See if this works for you.
$url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ?
$_SERVER['QUERY_STRING'] . '&' : '' ) . 'newVar=1';
The middle part basically sees if the QUERY_STRING is empty. If it is, it
includes a question mark other
> I have a multi-dimensional array. Looks like this:
>
> $work_order_hdr = array ('whdr_id'=>'record_no',
> 'whdr_order_no'=>'request_no',
> 'whdr_site_id'=>'site_id',
> 'whdr_user_id'=>'user_id',
>
301 - 400 of 481 matches
Mail list logo