balwant,
It seems to be working for me. I have looked at it from multiple
computers, and it always gives the ip of that computer. Try for yourself:
http://housing.uark.edu/resnet/ip.php
Let me know if you get something other than your ip.
~Philip
balwantsingh wrote:
i tried the
On Thu, 30 Sep 2004 11:00:35 +0530, balwantsingh
[EMAIL PROTECTED] wrote:
i tried the $_SERVER['REMOTE_ADDR'] it is giving ip address of server which
is hosting the webpage not the user's ip address. pls. suggest how can IP
address of an user can be obtained.
what exactly did you do? the
I'd recommand u to use a serialized variable saved in ur database.
As in the an array of keywords saved in an serialized variable once
the form is submited to save the query.
e.g.
$searchQuery = array();
$searchQuery[Keywords]= $_POST[keyword];
$searchQuery[JobCategory]= $_POST[category];
Serialized because it is easier to store ?
Stuart
--- M Saleh EG [EMAIL PROTECTED] wrote:
I'd recommand u to use a serialized variable saved
in ur database.
As in the an array of keywords saved in an
serialized variable once
the form is submited to save the query.
e.g.
$searchQuery =
I need to split the keyword on search input and generate an sql query,
for ex: the input value is: europe+america,asia
so I want to generate an sql like this:
SELECT * FROM mytable WHERE message LIKE %europe% AND message LIKE %america%
OR message LIKE %asia%
The + (plus) means AND and ,
I need to split the keyword on search input and generate an sql query,
for ex: the input value is: europe+america,asia
so I want to generate an sql like this:
SELECT * FROM mytable WHERE message LIKE %europe% AND message LIKE %america%
OR message LIKE %asia%
The + (plus) means AND and ,
function getIP() {
if (getenv(HTTP_CLIENT_IP) strcasecmp(getenv(HTTP_CLIENT_IP),
unknown))
$ip = getenv(HTTP_CLIENT_IP);
else if (getenv(HTTP_X_FORWARDED_FOR)
strcasecmp(getenv(HTTP_X_FORWARDED_FOR), unknown))
$ip = getenv(HTTP_X_FORWARDED_FOR);
else if (getenv(REMOTE_ADDR)
here is something similar. you should be able to adapt this easily
?
//Google like search engine for your site,
//the $not_search_word array can be added to,
//to limit the results even further for those
//common words that should not be searched for.
foreach ($searchwords as $word) {
/*
For
The MYI file is the index file. Is there an index on that table?
From: [EMAIL PROTECTED] (Jennifer Goodie)
To: blackwater dev [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], Subject: Re: [PHP-DB] rand()
Date: Wed, 29 Sep 2004 23:27:43 +
-- Original message from blackwater dev :
Ramil,
On Sep 30, 2004, at 1:17 AM, Ramil Sagum wrote:
On Thu, 30 Sep 2004 11:00:35 +0530, balwantsingh
[EMAIL PROTECTED] wrote:
i tried the $_SERVER['REMOTE_ADDR'] it is giving ip address of server
which
is hosting the webpage not the user's ip address. pls. suggest how
can IP
address of an
$whereStatement=str_replace(+, AND message LIKE , $strToParse);
$whereStatement=str_replace(,, OR message LIKE , $whereStatement);
SELECT * FROM mytable WHERE message LIKE $whereStatement
As for your invalid input example, good luck, I don't see any easy way
of doing that.
On Wed, 29 Sep
I can't get an efficient solution, the sql query to be generated by input
keywords should be boolean.
The input value should be splitted boolen like Google, they are
with all the words, with the exact phrase, with at least one of the words,
without the words..
an example input is :: america,asia
Lester Caine wrote:
Ed Lazor wrote:
Has any performance testing been done between ADOdb and PEARdb?
Not recently. Personally I am still trying to benchmark engines within
ADOdb against the latest Firebird.
This is an area where any results would be useful. There are speed
comparisons on the
Hay,
Is there a way to make a string into an integer?
I have a value coming from a textbox and I want to check if the amount in it
is 1.
Thanks,
Darryl
$string = '10001';
if((int)$string) 1) { echo 'Yep it is'; }
--
Joseph Crawford Jr.
Codebowl Solutions
[EMAIL PROTECTED]
802-558-5247
For a GMail account
contact me OFF-LIST
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If you use the value from a text box in a mathematical equation or
comparison, PHP will automatically attempt to handle it as an integer or
some other numeric type (e.g., float). So if you did something like:
if($_POST[myvar] 1){
...
}
PHP would handle $_POST[myvar] as an integer
Lukas Smith wrote:
mysql:
http://marc.theaimsgroup.com/?l=pear-devm=108239153527834w=2
ibase:
http://marc.theaimsgroup.com/?l=pear-devm=108240351804395w=2
there are other interesting points being discussed through out this
thread but with a noteably focus on the pear abstraction layers.
Yeah, I thought so seeing as I had done it like that previously, turns out
it was something else that was causing the problem :D
Thanks anyhow
:D
-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 5:43 PM
To: 'Darryl'; [EMAIL
Trying to set this up and have a question:
Example below , the example for state.
The field name is s_LocationState
The variable is set to state.
$State = ;
// check any item is selected
if (count($s_LocationState) 0 AND
is_array($s_LocationState)) {
$State = '.implode(',',
Thanks everyone.
urlencode worked like a charm.
On Sep 29, 2004, at 3:53 PM, GH wrote:
You need to use the urlencode() function
On Wed, 29 Sep 2004 13:23:07 -0500, Craig Hoffman
[EMAIL PROTECTED] wrote:
Hello,
I could use some help here. I have an entry in the MySQL, that use an
apostrophe,
We have a content management system and one of its features is what we call
a databse browser. What it allows you to do is take a table and display
contents in the way it is useful for the relevant audience. One of the new
features that was requested was editing the content which will in turn be
We have a content management system and one of its features is what we call
a databse browser. What it allows you to do is take a table and display
contents in the way it is useful for the relevant audience. One of the new
features that was requested was editing the content which will in turn
Does anyone have an idea what may probably be the cause of this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
in /var/www/ng/mailsender2.php on line 17
-
A passion till tomorrow,
www.opeyemi.tk
Yup, we're mind readers, I can figure out your entire script and
database structure from the error message.
On Thu, 30 Sep 2004 13:30:25 -0700 (PDT), Yemi Obembe
[EMAIL PROTECTED] wrote:
Does anyone have an idea what may probably be the cause of this error:
Warning: mysql_fetch_array():
It means that the supplied argument is not a valid MySQL result
resource so.. Line 17 of your script mailsender2.php is trying to
manipulate a variable that isn't actually a mysql result. In some
previous line you should have set the result resource variable equal to
something else, on that line
The method doesn't matter, use whatever you like.
Did this quick just for the fun, it seems to work. Set $search to
whatever you'd like to try or to your GET or POST argument.
,,, eurpoe won't cause a problem but + + + europe will generate
some odd SQL (although it will work as expected -
On Fri, 1 Oct 2004 10:27:45 +1000, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi,
When I use the variable $_SERVER['AUTH_USER'] it comes out as
domain\\username when inserted into the MySQL database. So when I try to
update the record looking for a match as below it doesn't work because
the
Thanks Ramil,
I knew it had something to do with the \, but I still can't figure out
how to get the variable into the database without the extra '\'
It is entered into the database via a form using the input below:
input name=ident type=hidden value=?php echo
$_SERVER[AUTH_USER];?
Where would I
No, still no idea :)
I did read the manual but I can't figure out how to use it in my script.
I'll paste the page below:
FORM ACTION=?php echo($PHP_SELF); ? METHOD=POST TARGET=_self
table border=1 width=80% bgcolor=#0D9BA4
tr
td width=29%bAEC Submission Title:/td
td width=81%
On Fri, 1 Oct 2004 11:32:29 +1000, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
No, still no idea :)
$sql = INSERT INTO aec SET date='$date', title='$title',
ident='$ident', id='$id';
mysql_query($sql);
I feel good today :) so,
$sql = INSERT INTO aec SET date='$date', title='$title',
ident='
I made the change but the domain\username now appears in my database as:
domainusername
-Original Message-
From: Ramil Sagum [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 October 2004 11:40 AM
To: Baiocchi, Justin (CSIRO IT, Armidale)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] The
On Fri, 1 Oct 2004 11:47:50 +1000, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I made the change but the domain\username now appears in my database as:
domainusername
You probably have the magic quotes enabled.
The manual page(
Hello,
On 09/30/2004 11:28 PM, Matthew Perry wrote:
Does anyone know of a good online source for using php and microsoft
access. I don't want to have to use asp.
Basically, you need to use ODBC but each database supported by ODBC has
its own features that require database specific treatment.
Here is a basic connect script. I would stringly recommend against using
access, use mysql instead.
HTML
HEAD
/HEAD
BODY
?php
// Program to test connecting to a Microsoft Access ODBC Data Source
$connection = odbc_connect(postcard, , );
print Connected to datasourceBRBR;
34 matches
Mail list logo