> REFERRER isn't always set, so that may be the problem.
>
> Try just a simple HTML page that has a link to a PHP page that echo's
> out $_SERVER['HTTP_REFERRER'].
>
> Does that work?
No.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>What do you get with this...
>echo ( "\n" );
>print_r ( $_SERVER );
>echo ( "\n" );
>From a blank HTML page, I get:
Array
(
[DOCUMENT_ROOT] => /var/www/html2
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
[HTTP_ACCEPT_CHARSET] => iso-8859-1,*,ut
>echo ( "\n" );
>print_r ( $_SERVER );
>echo ( "\n" );
On the redirect from http://compcanlit.ca/, I get:
Array
(
[DOCUMENT_ROOT] => /var/www/html2
[HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png,
*/*
[HTTP_ACCEPT_CHARSET] => iso-8859-1,*,utf-8
[H
ere. One thing I did notice is that the redirect comes thru on a
> different port. If this is consistant, you may be able to use this.
>
> John Taylor-Johnston wrote:
> >>echo ( "\n" );
> >>print_r ( $_SERVER );
> >>echo ( "\n" );
> >
a link from another page, it was set. I'll look at it a bit
> longer to see if there is anything out there to tell it was redirected,
> but it's not looking good.
>
> John Taylor-Johnston wrote:
> >>[SERVER_PORT] => 80
> >
> >
> > Server port d
How do I call this?
http://www.phpclasses.org/browse.html/file/2202.html
calendar; //gives me nothing.
Prints html header and that's it. It's a class and obviously I don't know what I'm
doing :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/uns
Yawn of frustration.
$dbtable = "ccl.ccl_main";
list($db,$table) = explode(".",$dbtable);
echo $dbtable.''.$list[$db].''.$list[$table].'';
echo $dbtable."".$list[$db]."".$list[$table]."";
I stumped :)
$list[$db]shows nothing
$list[$table] shows nothing
Ok, newbie time :( What's wrong?
-
Rasmus,
>You probably want just $db and $table
Yes I do. I need to learn a little more about declaring arrays & its syntax.
I figured I was declaring an array called "list". Then ... :) Copied & tinkered from:
http://www.php.net/manual/en/function.explode.php
Thanks!
Rasmus,
If I were going to remanufacture http://www.php.net/manual/en/function.explode.php I
would add/edit:
$data = "foo:*:1023:1000::/home/foo:/bin/sh";
list($user,$pass,$uid,$gid,$gecos,$home,$shell) = explode(":",$data);
echo $user."".$pass."".$uid."".$gecos."".$home."".$shell;
Thanks agai
check.php and even am able to read the written contents.
>
> but when i enter http://192.168.0.1/bdoi_change/sundar.html
> in my internet explorer address bar, it says the page cannot
> be displayed.
> the file permissio
Ok, someone help him out.
Maybe, just maybe the file belongs to someone else than you. I had that happen to me
once too. CuteFTP can show you that. Is this possible people?
What happened when you checked the permissions? 644? Then CHMOD it 644 again yourself
to see if it makes a difference.
ht
>dear john,
>
>i made the CHMOD myself to 644.
>but the file is still not opening.
>do u have any more ideas?
Sorry no. Tapped out. But I'm not a pro coder myself. Someone will answer. Someone is
awake and coding. Come on guys. Give the lady a break.
>and i am not 'he'.i am 'she'.
I stand corre
> > the file permissions are "rw-r-r"
> Stupid question -- are you running a webserver?
Charming isn't he?
> /*
> The fact that 47 PEOPLE are yelling and sweat is cascading down my
> SPINAL COLUMN is fairly enjoyable!!
> */
Indeed. Help the "colleague" out Jason, or get off the channel.
--
PH
Hey,
I'm using PHP & MySQL to generate a RTF document. I use this header:
header("Content-type: text/rtf");
Of course, the header scares the poor browser. The browser bawks and says, unknown
file type, and instructs the browser to save the file.
It tries to save a file called "export_to_rtf_te
Just a hunch:
""
Try using "
Do you have a URL to show us what your page does and doesn't do?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I didn't know a debugger was available? Then again, I'm no expert. However, as an
aside note, rename your file to *.PHPS
This will display your code in a readable, color-coded fashion, allowing you to
decipher possible problems yourself.
Newbie advice, but helps some.
--
PHP General Mailing Li
Works great. Thanks,
John
> >I'm using PHP & MySQL to generate a RTF document. I use this header:
> >header("Content-type: text/rtf");
> header("Content-Disposition: attachment; filename
[i] How or why do researchers adapt technology to their research projects? Should they
adapt their projects to technology? Indeed, how often does the research assistant end
up reinventing the wheel? [/i]
I know most of you are E-Commerce oriented, but I would appreciate your feedback. I
use PHP
lly CHMOD them all to 777 with no problems. I don't see why I'm getting
> all this! Please help ASAP! Thanks in advance!
--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's L
\015\012)|(\015)|(\012)/","", $txt);
>
> I can substitute other characters and dec equivalents and the
> substations just won't work for \r\n [or just \r or just \n] or "\015"
> or "\15".
>
> And, I've t
http://www.php.net/manual/en/function.mail.php
Note my changes in your HTML!
mail("[EMAIL PROTECTED]", "Subject: sending results by email", "MyText: \n$MyText
\ncheckbox2: $checkbox2");
HTH?
John
>
>
>
>
>
>
>
Does id even exist?
HTH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I stopped using pconnect. Don't see the sense in it. Why take the chance?
http://www.php.net/manual/en/function.mysql-pconnect.php
Warning
Using persistent connections can require a bit of tuning of your
Apache and MySQL configurations to ensure that you do not exceed
the number of connections al
Style sheet stuff?
own progress, which will be a
> big relief for the administration people. So it is university related but
> not really research related.
--
John Taylor-Johnston
-
"If it's not open-source, it's M
t variable can I muster up to do this?
--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."
' ' ' Collège de Sherbrooke:
ô¿ô http://www.collegesherbr
Which variable should I use?
_SERVER["HTTP_HOST"]
_SERVER["SERVER_NAME"]
HTTP_HOST
Server_NAME
Host
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jason,
$_SERVER is outdated now isn't it?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Instead of doing this:
Which function am I looking for to see if $HTTP_HOST contains "compcanlit"?
This is not what I am looking for:
http://www.php.net/manual/en/function.similar-text.php
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsu
Off topic :) ?
Anyone know how to explode using javascript?
$pieces = explode(" ", $pizza);
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anyone do MySQLDump using PHP ?
http://www.mysql.com/doc/en/mysqldump.html
My code is:
mysqldump -u ** -p ** -A > /home/mybackups/dump_all.sql
I would like to pull it off using PHP, remotely.
$date = date ("Ymd");
$to_path = "/home/MyBackups/$date/dump_all.sql";
mysqldump -u ** -p
Thanks!
> exec("mysqldump -c -q database -u user -ppassword", $sql);
Why is there no space between the -p and password?
>-ppassword
Am I wrong?
Thanks,
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stripslashes I think.
Gregory Chagnon wrote:
> When I submit a form with a text area containing the test "//server/share"
> and try to echo the variable it echos "server//share". Is there any way
> to prevent the extra /'s? Thanks
This works:
exec("mysqldump -u -p -A > test.sql");
This doesn't.
exec("mysqldump -u -p -A > $filename");
:)
$filename");
echo "dump completed on $filename ";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Scratch that. Had a CHMOD problem.
Sorry.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Assuming MySQL can do this, I need to generate some code that would MOVE a record from
one table to another. Not just a MySQL code problem?
Pseudo code: base.table
select base1.table where id=25
insert result base2.table
delete base1.table where id=25
Can I even do this in MySQL? If so, what wi
I was wondering about this, but decided to ask first first:
INSERT INTO ccl.ccl_main VALUES (select * from greid.ccl where id=28);
delete * from greid.ccl where id=28;
Both tables would have to have the same structure ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: h
Found this for anyone interested.
http://www.mysql.com/doc/en/INSERT_SELECT.html
John Taylor-Johnston wrote:
> I was wondering about this, but decided to ask first first:
>
> INSERT INTO ccl.ccl_main VALUES (select * from greid.ccl where id=28);
> delete * from greid.ccl where id=
Nothing fancy. Can't get it to echo ¶
mary
had
a
little
lamb
if ($testtextarea)
{
$inputresult = str_replace(\n, '¶'.\n, $testtextarea);
echo "$inputresult";
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have also tried:
$inputresult = str_replace('\n', '¶\n', $testtextarea);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jon, Anyone,
Paragraph sign actually. I'm filterting some data for MySQL. I need a field delimiter.
I don't want to use \n. Contents of each field are on a signel line of text.
I have come up with this, unless someone can suggest better:
if ($testtextarea)
{
$inputresult = str_replace("\r", "",
http://www.php.net/manual/en/function.stristr.php
http://www.php.net/manual/en/function.strpos.php
Input from a
I want to scan endless lines of $something. If the First Three characters
of any line begin with "au:" (case insensitive) I want to filter out that line,
and let $au = that line of tex
","")or die("Could
> not connect");
> print "Connected successfully";
> mysql_select_db("bdoi_change")or die("could not select
> database");
>
> $query = "select * from entry where login='$login&
Can I run a php script in crontab?
Do I echo or print?
Anyone doing it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Cal, Liam, Jimmy,
Thanks. If this is a serious security hazard, could you show me some code that is more
secure? I am the "root". Mind you I've never worked with crontab before. I want to run
/var/www/backup_mysql.php I suppose I should start by putting it somewhere not
publicly accessible?
Tha
Sigh :) It all works so much better if I use:
if(eregi('^au: (.*)$',$line,$m)) {
But I want to use a function. But nothing is returned. So what did I do wrong now?
--snip
echo filter_strings("au:");
function filter_strings($tofilter){
echo $tofilter."";
#if(eregi('^$
Thanks Keven. Didn't see that.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
#http://www.php.net/manual/en/function.fopen.php
$contents = fopen ("/home/pathto/file.txt", "r");
if ($contents){echo"$contents";}
else{echo "no contents there";}
Questions:
What is the use of "@fopen"?
Does anyone see a better way?
--
PHP General Mailing List (http://www.php.net/)
To unsubs
Three advantages I like:
1- no more cgiwrap.
2- thus I can work in any directory and am not bound to cgi-bin
3- Sheer ease of coding. A lot easier to learn, it's open-source and newsgroups are
more helpful. Perl groups are less helpful, programmer centred and not newbie-friendly.
Just my 2¢
--
If you switch over, will you be able to port your database?
> Does PHP use less system resources than CGI on a server?
> I have a bulletin board which is incredibly active, but there is a PHP
> sister to it.
Again, when coding for a BB, I appreciate not being bound to work in /cgi-bin/
especial
Mat>To get data out of the file that you
Mat>have opened, you will need to read() it n.
Mat>http://www.php.net/manual/en/function.fread.php
Ok, how about this? What about error checking if the file contains something as I
include below? Is that enough?
$contents";}
else{echo "no contents there";
http://www.php.net/manual/en/function.fread.php
What about error checking if the file contains something as I include below? Is that
enough? Is this the right way?
$contents";}
else{echo "no contents there";}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://w
Instead of using fread, I want to upload a *.txt file using:
and display it in a textarea. Where do I go now? Specifically, how do I get $contents?
Thanks,
John
$contents";}
else{echo "no contents there";}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
I need to upoload a local text file into memory using:
The script below will only work if I am using my localhost.
Any ideas?
John
\n";
if (!$filename)
{
echo "!\$filename \n";
}else{
#$filename = "/usr/local/something.txt";
#echo "\$filename $filename\n";
$handle = fopen ($filename, "r");
Jason, I've already been looking at:
http://www.php.net/manual/en/function.move-uploaded-file.php
http://www.php.net/manual/en/features.file-upload.common-pitfalls.php
http://www.php.net/manual/en/features.file-upload.php
Indeed: http://ca.google.yahoo.com/bin/query_ca?p=php.net+upload+file
and
ht
You are going to need to start a session.
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.session-start.php
The idea was to see if $variable was in the session. If it was, use the session
variable. I was passing a lot of variables through before this,
until I
Where in the manual?
> > I'm looking for a couple of lines of code so I can upload the contents of a
> > *.txt into a buffer
> You can't upload to a 'buffer', it has to be a file. Example in manual on how to
> upload a file.
Here? http://www.php.net/manual/en/features.file-upload.php ??
> BUT i
Nifty. To share my finding ...
Thanks,
John
Upload File
C:\WINDOWS\Bureau\microweb\ERIC.TXT
Read this file:
Upload Results
Your file contained:
\n";
echo "$fileContents\n";
echo "\n";
#echo ($fileContents);
?>
file_uploads = 1
upload_max_filesize = 2M
upload_tm
$HTTP_POST_FILES as opposed to $_FILES is older syntax? $HTTP_POST_FILES is still
compliant?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have an *.inc with html, a rather long list of . I want to clean this up
some.
I'm going to declare $FieldName and $ToBeSelected before I call
include("options.inc"). I also want to select one of the in advance.
The problem is ... this is beginning to look like a function, which I will decla
Ok, I'm off topic. I'm trying to build some php code but can't get my SQL right.
http://www.mysql.com/doc/en/INSERT_SELECT.html
insert into ccl.ccl_maintest
(id,RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR)
select
id,RNum,YR,AU,ST,SD,SC,BT,BD,B
ur field list?
> insert into ccl.ccl_maintest (id,RNum,YR,AU,ST
> ^^^
> Here :)
>
>
>
> J
--
John Taylor-Johnston
-
"If it's
New at this, somewhat:
http://www.php.net/manual/en/ref.array.php
$EricCodesArray = array (
"CO" => "Description", "Input Name", "Select Name", "Option Name", "Option
Selected",
"AN" => "ERIC Number", "EricAN", "SelAN", "AN", "AN «Annotation»",
"TI" => "Title", "EricTI", "SelTI", "BT"
echo $EricCodesArray[2][2];
No.
> would this work ?
> $EricCodesArray[2][2] ?
> #http://www.php.net/manual/en/ref.array.php
> $EricCodesArray = array (
> "CO" => "Description", "Input Name", "Select Name", "Option Name",
> "Option Selected",
> "AN" => "ERIC Number", "EricAN", "SelAN", "
>>echo $EricCodesArray[2][2];
No. Sorry. Empty set.
I would also like to express it something like:
select EricCodesArray where TI displays [2]
I want to pass TI into a function and build some html for that record.
Pseudo code:
echo (TI[0] );
$EricCodesArray = array (
"CO" => "Description", "
I have an array $var (see structure below), which contains AN, AU, TI, PY ... etc. (28
in total - no teasing.) How can access these keys so I can do this:
foreach key in $var until $var.length
{
if(!$something){$something = filter_strings("something: ",$line);}
}
So I can avoid doing this 28 tim
I need to stripslashes() practically every $value as I pass data from one submit to
another.
L\'apprentissage d\'une langue ...
Instead of doing it to every $value, someone showed me once something I could add
something to the beginning of my script. It was some type of code on a post_var that
I don't know whether this is a MySQL or PHP quesiton.
$SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
I would like to get the autoindex value of my table and use it in my SQL. Can I get
the autoindex? :) How?
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
Anyone know how to get the auto_increment $value out of a mysql table.
I'm thinking it is in mysql_fetch_array but don't see how to get it.
> $SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
>
> I would like to get the autoindex value of my table and use it in my SQL. Can I
$news = mysql_query("SHOW TABLE STATUS FROM ".$db2." LIKE '$table2'");
while ($table_status = mysql_fetch_array($news))
{
$autoindex = $table_status['Auto_increment'];
}
Got it. Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
I'll have a look at that too. Thanks!
What do you make of this: My browser is all snuffed up! It dodnint wwork aniwore!
http://ccl.flsh.usherbrooke.ca/tools/
Choose Greid. Works ok.
Choose JDaxell and the stops working after 184.
Even with:
Too much HTML or too much in one . I'll have to ge
Necessary, or at least cleaner, if there are less than 5 records in your database.
> Why don't you just use "select * from table order by id DESC limit 0,5"?
>
> I don't see any necessary to get the auto_increment value.
> > Anyone know how to get the auto_increment $value out of a mysql table.
Sounds better. Thanks
Jimmy Brake wrote:
> hmm
>
>
> i could be misunderstanding but
>
> select max(your_autoincrment_column) from your_table
--
John Taylor-Johnston
-
"If it's not op
For the record, am I declaring these in the correct order?
Thanks,
John
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You do have to declare the headers first !!??
John Taylor-Johnston wrote:
> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
>
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$d
You do have to declare the headers first !!??
John Taylor-Johnston wrote:
> For the record, am I declaring these in the correct order?
> Thanks,
> John
>
>
> header("Content-type: text/notabene");
> header("Content-Disposition: attachment; filename=".$d
I thought I understood this example: http://www.php.net/manual/en/ref.array.php
array(
'first' => 'Caleb',
'last' => 'Maclennan'
)
);
echo "My first name is {$var['name']['first']}!";
?>
I can do that. But, my array looks more like:
$var = array (
I understand the principle of mail. What I want to do is use a as a mailing
list, something like this. How do I loop it?
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
hi everyone,
how are you?
http://www.php.net/manual/en/function.mail.php
?>
John
--
PHP General Mailing List (htt
Ok, this is a basic MySQL question, but I don't know how to code it in PHP. I want to
check in StudentId. If it exists, ...
Anyone good humoured who would help me fill in the blank. Like I should know this, but
haven't even thought of coding SQL in a while :)
$myconnection = mysql_connect($serve
Ok ... so I can do it this way (below), but there must be a more intelligent way? This
is like something I did with my Vic20, 19 years ago. (If you ever had a Vic20 ... :)
you might sympathise)
while ($mydata = mysql_fetch_object($news))
{
if ($mydata->StudentId = $StudentId)
{$found =1}else{$fo
OK,
I tried this, but am getting this error:
Warning: Wrong parameter count for mysql_num_rows() in /.../testals.php on line 189
189> if (mysql_num_rows() == 1)
What's up?
John
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
$news = mysql_query("select Stu
> I had a Vic20 sitting next to a Lisa... :)
The debate in them days was whether a timex-simplex would outlast. Commodore sold a
lot but never went anywhere past high school labs. I knew a guy with a PC who laughed
at every else. Funny how things turned out.
--
PHP General Mailing List (http
:) Tried that:
Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on
line 189
189> if (mysql_num_rows($news) == 1)
John
> Matt> mysql_num_rows($news)
$server = "localhost";
$user = "";
$pass = "";
$db = "redwards";
$table = "testals";
$myconnection = m
My question got buried on the bottom of the thread. Sorry for the repeat. I'm getting
this message:
Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on
line 189
189> if (mysql_num_rows($news) == 1)
Ideas?
$server = "localhost";
$user = "";
$pass = "
Have I over done this? Can I clean up this code any?
I have two states
1) Admin mode
2) Normal mode
in Normal mode, I have two states:
a) student is not in the database
a) student is in the database and has likely reloaded the browser. I'm trying to avoid
multiple entries with the same $Student
$P1OC1Q1 = "1¶some text or some comment";
echo "Your score is: "; $score=split($P1OC1Q1,"¶"); echo
$score[0]."\n";
Do I have to go through all that to get score[0] ?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Kind of hoping to do shorten it like this:
echo "Your score is: ".$score[0]=split($P1OC1Q1,"¶")."\n";
No such hopes?
> Looks like a really simple piece of code except for the cryptic variable names.
>
> >$P1OC1Q1 = "1¶some text or some comment";
> >echo "Your score is: "; $score=split($P1OC1Q1,"
> Why not:
> echo "Your score is:
> ".split($P1OC1Q1,"¶")."\n";
Ok, but what happens when $P1OC1Q1 = "". It errors out.
$P1OC1Q1 = "";#left blank
$P1OC1Q2 = "1¶bunch of text";
$P1OC1Q3 = "1¶bunch of text";
$P1OC1Q4 = "1¶bunch of text";
$P1OC1Q5 = "1¶bunch of text";
$P1OC1Q6 = "1¶bunch of text";
some comment";
echo "Your score is: "; $score=split($P1OC1Q1,"¶");
echo $score[0]."\n";
My problem becomes more difficult when $P1OC1Q1 = "";
Split errors out.
SævË Ölêöyp wrote:
> Why not:
>
> echo "Your score is:
> ".split($P1OC1Q1,
How can I find out if $mystring includes the character "¶"?
Thought substr would do it?
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, scrap that:
if (substr_count($mystring,"¶") >0)
John Taylor-Johnston wrote:
> How can I find out if $mystring includes the character "¶"?
> Thought substr would do it?
> J
--
John Taylor-Johnston
--
I was wondering.
http://www.php.net/date
gives me/redirects to:
http://www.php.net/manual/en/function.date.php
How do they do that?
What $_post[??] is that? Or is it a sevrer (Apache, I suppose?) thing?
--
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Aw gee, $_SERVER['REMOTE_HOST'] (only REMOTE_ADDR) does not exist in PHP?
Bummer.
Why is that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Not teasing, I know I could do this with some ready made script, but I want to make my
own.
I'm making a counter.
CREATE TABLE `counter` (
`IPAddress` VARCHAR NOT NULL ,
`RemoteHost` VARCHAR NOT NULL ,
`TimeStamp` TIMESTAMP NOT NULL,
`Date` VARCHAR NOT NULL
)
Question 1, how do I creat
Get your mail sysadmins to install spamassassin, which I believe is OpenSourced PHP,
and the filter your {SPAM} directly into the garbaaage. if everyone did this, and
therefore stopped opening dangerous mail, maybe we could slow some of this down. :) Oh
well, just my 2¢
> On Wed, Aug 20, 2003
Help me out here. I want to get a numeral on the number of records in a table.
What is the function?
http://www.php.net/manual-lookup.php?pattern=fetch%2Brows&lang=en
http://www.php.net/manual-lookup.php?pattern=fetch%2Brecords&lang=en
? :)
John
--
PHP General Mailing List (http://www.php.net/
This is what I'm using so far. But I need to put in a time stamp to calculate if the
visitor is new. I want to use the IP so if the ip saved in MySQL is older than 60
minutes, it will write a new record, if not, don't:
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myco
Anyone? Please :)
John Taylor-Johnston wrote:
> This is what I'm using so far. But I need to put in a time stamp to calculate if the
> visitor is new. I want to use the IP so if the ip saved in MySQL is older than 60
> minutes, it will write a new record, if not, don't
I'm creating a counter.
I want a timestamp where I can calculate if a time stamp is older than one hour, if so
do X, if not do Y.
>Gabriel Guzman wrote:
>http://us4.php.net/time
>and
>http://www.mysql.com/doc/en/DATETIME.html
I have looked at both, especially http://www.mysql.com/doc/en/DATETIM
Indeed easier than I thought?! :)
timestamp(14) is ok :)
Thanks John!
John
--
http://compcanlit.ca/
Quoting "CPT John W. Holmes" <[EMAIL PROTECTED]>:
> SELECT * FROM Table WHERE timestamp_column < NOW() - INTERVAL 60 MINUTE
> will give you all rows that have a timestamp column that's over 60 minu
301 - 400 of 829 matches
Mail list logo