; link to email your
congressman.
Thank you,
alex*hogan*
~
*
*
*"I'm working on a story that the world needs to know about. I wish for you
to help me break it, in a way that provides spectacular proof of the power
of news photography in
od overloading.
It's not extremely clever by any means but it gets the job done. Besides
I'm kinda lazy.
I'm sure there are several wrappers that do the same thing.
alex hogan
else{
break;
}
}
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
then determine
that he is going back and redirect to an error page or a login page.
[/snip]
On the processing page you could put something like;
if($_SERVER['HTTP_REFERER'] != 'myFormPage.php'){
header("Location: YouGotHereWrong.php");
}
alex hogan
--
[snip]
BTW. What is STFU?
[/snip]
Ooo.., let me do this one...
This is one I can answer. ;-)
STFU (Shut the F*%# up!)
alex hogan
*
The contents of this e-mail and any files transmitted with it are
In terms of performance which is faster.
mssql_fetch_array($var,mssql_assoc) or mssql_fetch_assoc()?
I read in the manual that mssql_fetch_array() isn't noticably slower
than mssql_fetch_row(), but I didn't see anything about
mssql_fetch_assoc() in terms of performance.
I was wondering if anybod
able fields and I'm done.
function insert($table, $fld, $val){
$query = "INSERT INTO $table (%s) VALUES (%s)";
$query = sprintf($query, implode(",", $fld), implode(",", $val));
$result = mssql_query($query) or die;
}
alex hogan
--
her day.
Try using;
preg_match_all("(([[:blank:]+]|^)[09][0-9][4789][0][0-9]{3}[abcABC]?)",
$zn[1], $zaaknummers1);
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
) unless you only want to get the first match.
I caught that after I reread the manual.
> Also, I don't believe readfile() is what you want. It looks like
> file_get_contents() is more in line with what you are trying to do.
That's got it.
Thanks...
alex hogan
--
PHP Ge
> I just tried this out and the first regex is actually working for me on php 4.3.8
> (cli). Can you post some code?
At this point all I'm trying to do is print the array with the addresses.
$file=readfile('mypathto/myfile.html');
$patrn =(\w[-._\w]*\w(?http:/
Hi All,
I am trying to identify an email address in a page but I don't want to
return the email if it's [EMAIL PROTECTED]
Here's what I have;
(\w[-._\w]*\w(?http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or
include_once('another.php');
}
is what you're looking for.
If you're looking to redirect to another file based on a condition then;
if(isset($var)){
header('Location: another.php');
}
will work.
alex hogan
--
PHP General Mailing List (http://
[snip]
"^Q4_[0-9]$"
&
Yes, your understanding of "^Q4_.[0-9]$" is wrong.
[/snip]
Thanks guys..,
I did take the '.' out of the expression, but I also had to change the
way I was using it.
I replaced;
if($key == ereg( "^Q4_.[0-9]$", $key)){
with
Please ignor...
I got it...
alex
On Thu, 30 Sep 2004 16:22:02 -0500, Alex Hogan <[EMAIL PROTECTED]> wrote:
> I have a series of questions that are multiple choice. Some of the
> questions have multiple answers to them.
>
> Those questions have answers that are indicated
9]$", $key) should look for a $key
starting with 'Q4_' followed by a single number and place those values
into an array named $Q4scores.
What am I missing?
Thanks,
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
17 of index.php.
Header() can only be used if there has been no header information sent
to the page.
You will need to see what is on line 3 and probably line 2 of connection.php.
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t as a command line task or as an instance of
the browser?
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ill do the mail
outs on the appropriate date, but there has to be a better way.
Is this something that I'll have to do outside of php?
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
them using the same
name but call two differnent files. I've never done that but I don't
see why it wouldn't work.
> I am going to run into conflicts if I include two class definitions for
> search, am I not?
Yep. If you call them both at the same time.
alex hogan
--
PHP
extend the class using;
class subSearch extends Search{
// do stuff here
}
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
esses email I have a config.php file that will include the
class files necessary for the email functionality. In the admin
section I have a config.php file that includes the admin
authorization, editing and insertion, and modification class files.
I don't know if it's a right way or wrong
Until now I've always thought of plugins as purley
client side development.
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you talking about something else?
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Just to be pedantic, that would be pedantry ;) !
Is this thread ever going to die? Or would that be dye? ;)
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential
ebug the file I don't
get anything that indicates that it won't parse the class.
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential and
intended solely for the
> Imagine all the people that'll want to post to a John Holmes list!!!
People would be wide open for that list.
Sorry.., I couldn't resist... Just had to take the low road...
alex hogan
*
The con
he values.
I sure will be glad when I don't make these kinds of simple mistakes
anymore.
Thanks guys...
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential and
x27;", $val)
implode(",", "\"".$val."\"") - This blows up nicely ;-)
Where am I going wrong on this?
alex hogan
*
The contents of this e-mail and any files transmitte
> Did you try a curveball when throwing the processors into the box?
Processors like sliders...
Can't lay off 'em.., can't hit 'em.
alex hogan
*
The contents of this e-mail and any fi
ure that there wasn't any duplicate
functionality or duplicate calls.
Apparently I must've been calling it from someplace else that I can't
find, and changing to include_once() fixed the problem. I just don't
understand why it worked f
[snip]
> I figured PHP's memory limit per script at 8mb might be the
> bottleneck, so I upped it to 128, restarted apache, and reran
> the script. Increasing available memory had no effect.
[/snip]
This may have already been addressed, but did you index any key fields?
the
previous version. I only had half a day to change the production
environment so I wanted to make sure there was no lag. Unless there was
something that I missed.
At first I thought that I had either duplicated the function someplace
else, but that wasn't the c
27; to
'include_once()', but I really want to know why this happened and why it
didn't throw that error until now.
alex hogan
*
The contents of this e-mail and any files transmitted with it are con
[snip]
> Because $answers = 5; is the last check of $answers unless
> the else statement is invoked. Try this...
[/snip]
That was it.., I don't know why I didn't see that.
Thanks Jay.
alex
*
The contents of
[snip]
Perhaps we need a:
Subject: [Elite Guide] for the seasoned php poster.
Post everyweek :)
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
[/snip]
I don't care who you are that's funny r
> All I have to say is, sorry I asked.
OK.., now you're really making me want to take a poke at you.
You posted off topic, knew it was off topic, you got spanked for it.
Don't make things worse by whining.
Does this mean that they
don't get the same consideration that those get who it is apparent that
they have been hacking code for a while?
This is a general list.
alex hogan
*
The contents of this e-m
r members of this list from the older ones. Then again maybe it's
nothing more than the age old trait of chastising someone else to give
themselves a feeling of importance.
My point is a little temperance goes a lot farther and shows a lot more
than self importance.
BTW.., Yes I'm
Submit ) )
Ten separate arrays with an array at 0 that has the data I'm after.
This is where I'm getting stuck. How can I get to the keys that are
either 'mc' or 'truefalse' and sum them?
Thanks,
alex hogan
**
x27;$key')
VALUES ('$value')";
$result = mssql_query($sql);
}
}
I keep getting an invalid object 'registration' error. However
registration is the name of the table. I'm guessing it's someplace
Hi All,
How do I write a function with optional arguments? Is it possible in
php?
function myfunc($First, $Second,[$Third, $Fourth]){
some stuff here
}
alex hogan
*
The contents of this e-mail
[snip]
> ...
> $block=new Block($header,$content,$link,$andsuch);
> $block->display();
> ...
[/snip]
That's very cool...
Thank you...
alex hogan
*
The contents of this e-mail and any files
L generated
> by the called page. read() and
> fopen() will get the output of that page and make it
> available to you for your own processing.
OK...
alex hogan
*
The contents of this e-mail and any files
the parameter values are record sets.
What happens is that I get the first three params and then nothing.
Any ideas?
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential a
Does anyone on this list live in Vienna?
If so please contact me off list.
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential and
intended solely for the use
> Don't you require Windows 3.1.11 for proper network support
> :) - at least 3.1 was stable.
Poke fun all you want..,
Everyone knows the real OS was Warp! ;-)
*onward flamewar soldiers*
alex hogan
**
When I'm using the time() function am I getting the time on the server?
If not how can I get the time from the server regardless of whether or
not its in the same time zone as the client.
alex hogan
Does anybody know of any peculiarities in the strtotime() function?
If I enter any date before 1 Jan 1970 I get a -1 returned.
alex hogan
*
The contents of this e-mail and any files transmitted with
think small enough, they worry
too much on the lesson and not enough on the objectives that make up the
lesson and how they can be made into expressions that will transcend
lessons, courses, etc...
alex hogan
*
T
#x27;m a little brain dead this morning.
If I have something like this what I'll want to do is to identify the point in the
array where I can force the selected to be the default based on the previous search.
>Make Selection
$n";
}
?>
Is there
selection to the appropriate location.
alex hogan
*
The contents of this e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom it is
ny language null is of no
> value equaling nothing?
> So how can it equal 0?
You can use is_null instead.
If(is_null($var)){
do something
}
Else{
do something different
}
alex hogan
**
The contents of
Hi All,
I am looking through the manual and I think I may be blind or something, but
how can I create an associative array from two arrays.
What I have is two arrays that look like this;
Array1([0]=>Spider, [1]=>Monkey, [2]=>Cards)
Array2([0]=>26.3, [1]=>0.65, [2]=>62.07)
I want to combine them
> What's in your array?
$array1[0] = 'firstname';
$array1[1] = 'lastname';
$array1[2] = 'tkt_title';
I got that fixed.
Thanks.
alex hogan
**
The contents of this e-mail and any files tra
[snip]
I do have one question though. I ran your code and it only returns the
first letter for that element in the array. For instance fieldone returns
as f and tableone returns as t. The output looks like this; SELECT f,f,f
FROM t,t.
[/snip]
Never mind I found it. It should be;
$query = "SELEC
[snip]
> $query = "SELECT ";
> $start = true;
> foreach ( $array1 as $flds ) {
> if ( $start ) {
> $query .= $flds[$i];
> $start = false;
> } else {
> $query .= ", " . $flds[$i];
> }
> }
> $query .= " FROM ";
> $start = true;
> foreach ( $
Hi All,
I am having a logic problem. (insert jokes here) I am trying to create a
function that will allow me to pass any number of fields and tables into a
blanket query.
I am getting an error; Unexpected foreach. I have tried placing the loop in
several different places and am getting the same
nd
> when I don't.
This is an explanation that's in the manual.
$conn->Open("Provider=SQLOLEDB; Data Source=localhost;Initial
Catalog=database; User ID=user; Password=password");
http://www.php.net/manual/en/ref.com.php
alex hogan
> -Original Message-
Thanks guys...
alex
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed. The views stated herein do not
necessar
Hi All,
Is it possible to use the users WinNT network login for a php app?
If so can someone point me in the direction for a tutorial or directions.
Thanks,
alex hogan
**
The contents of this e-mail and any files transmitted
I guess I deserved that one...
alex hogan
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 9:40 AM
> To: Alex Hogan; PHP General list
> Subject: Re: [PHP] Limiting an array to unique values
>
> From: "Ale
Thanks...
Exactly what I needed.
alex hogan
> -Original Message-
> From: joel boonstra [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 9:30 AM
> To: PHP General list
> Subject: Re: [PHP] Limiting an array to unique values
>
> On Tue, Apr 06, 2004 at 0
array?
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed. The views stated herein do not
necessarily
unt,2)' it returned;
Total Amount
0.00
Solution:
The solution was in the query;
SELECT cast(totalamount as numeric(10,2)) as totalamount
This returns the proper formatting;
Total Amount
123.50
alex hogan
**
The contents of t
> [snip]
> My last resort would be to go into the db and do a conversion there but
> I
> really don't want to do that.
> How can I convert these to represent a readable dollar figure?
> [/snip]
>
> start with http://www.php.net/number_format
I tried that and it converted the values to 0.00. I kn
Analyzer they come up;
Price
.7500
Total Amount
25.5000
My last resort would be to go into the db and do a conversion there but I
really don't want to do that.
How can I convert these to represent a readable dollar figure?
alex hogan
***
few references to it, but nobody seems to have an explanation.
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is
> Wow... you're totally missing the point of a database when you store data
> like this.
Not my db...
> So how many times does the while() loop execute?
Once
>How many rows is your query actually returning?
Just one.
>What does the output actually look like and what should it look like.
9
little present from MS Outlook. Glad to hear
your headache is gone though.
> $entire_recordset = mssql_fetch_array($result);
>
> foreach($entire_recordset as $row)
> {
> // looping code goes here
> }
Thanks...
alex hogan
**
x = 0; $num > $x; $x++) {
$avg[] = $total[$x] / $i;
echo "";
echo $avg[$x];
}
}
Thanks,
alex hogan
**
The contents of this e-mail and
> $row is an entire array. you don't explode an entire array, you only
> explode the contents of an element of an array.
>
> print_r($row) will give you some clues.
>
> you'll need to access a specific element within the array. like:
>
> $thearray = explode('__', $row[0][0]);
That was it... Tha
$i++;
}
}
When I call the function I get;
Notice: Array to string conversion in \WWW\mypath\srvyclass.inc.php on line
40
Array
question 1
What am I missing?
alex hogan
**
The
> (a) if you're using any values sent via the URL string (e.g.
> cf=0), you need to
> use $_GET, not $_POST;
Some of the information is coming from a form and the info from the url is
to call the different questions. They are all on one page in a switch
statement.
> (b) empty() will also evaluat
>$_SESSION['selloction'] = '0';
>
>1) Are you sure you don't have a typo above?
I checked the code and it's just in this post. Fat finger day.
> If you want to set a session variable (and keep it set) when you do a
> redirect
> you need to the close the session first.
Thanks...,
alex
*
Hi All,
I know this may be a bad time..., that whole top posting vs. bottom posting
debate has got me riveted, (especially after getting a monitor full the
other day), but I have a question.
I have a page that displays a survey. 11 questions all separated in a
switch statement on a page na
re is a link that explains taking javascript vars and putting them into
php vars.
http://www.iwdp.co.uk/javascript_to_php.htm
HTH,
alex hogan
> -Original Message-
> From: res0b8b6 [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 10, 2004 10:58 PM
> To: [EMAIL PROTECTED]
>
> That cured 9 but it still freaks on 10. It returns the error for the
> entire
> loop count.
> [/snip]
>
> Because $paging might be turning the integer you need into text? Maybe?
I found it.
In that sql statement I'm using SELECT DISTINCT
In the sql statement that I'm using to get my recor
> Try this
>
> $query = "SELECT DISTINCT q.questions
> FROM SG_Questions as q, SG_QuesRef as r
> WHERE r.pos_id = '$pos' AND r.sic_id = '$sic' AND
> r.cat_id
> = '$cat' AND r.ques_id = q.ques_id";
> $result = mssql_query($query) or die("Can not execute query $q
> What does mssql_num_rows($query) return?
105
alex
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed. The vie
$result, $i);
$row = mssql_fetch_array($result);
...etc...
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is a
>PLEASE STOP TOP POSTING!
Sorry Didn't mean to don't even know exactly what it is
> Are you selecting all of the records at once, or just a few at a time?
I am returning a few records at a time.
There are 10+ rows of data.
Actually I should say there are over 100 rows of data returned and broken up
into sets of 10 records each. (approx. 103 total records)
alex hogan
> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 09, 200
_seek(): Bad row offset in [snip] on line: x
The line in question is the one above.
Why does it work fine until it reaches 9?
Why can't the offset go above 8?
I searched google and came up with several of the top hits that had this
very error on their pages. Very nice....
$bgcolor = "#FF";
}
else{
$bgcolor = "#F2F7FF";
}
echo "$name\n";
}
Something wrong with my syntax?
alex hogan
P.S. OP is origin
My mistake.
Good one on the spelling I can't believe I missed that one....
alex hogan
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 08, 2004 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Variables insid
ndensintion..., maybe I can return the favor sometime.
alex hogan
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 08, 2004 11:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Variables inside a function
>
> On Tuesday 09 Ma
Don't you need to set a return?
Return $blah;
At the bottom of your function block.
alex hogan
> -Original Message-
> From: Nathan Croker [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 07, 2004 6:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variables inside
Hi Ben,
The setting in the php.ini is;
mssql.textlimit = 4096
Reset that value to what you want. I have mine set to 400.
Valid range 0 - 2147483647
alex hogan
> -Original Message-
> From: Ben Ramsey [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 08, 2004 10:30 AM
>
Yep..., it's Friday brain has left the building....
alex hogan
> -Original Message-
> From: Richard Davey [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 05, 2004 1:46 PM
> To: PHP General list
> Subject: Re: [PHP] Returning only a row count of 1?
>
&g
Dohhh,
Forget I asked
alex hogan
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 05, 2004 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Returning only a row count of 1?
>
> On Saturday 06 March 2004 03
lttotalcount);
I only return a count of 1.
Am I missing something? I checked the manual and archives and have come up
empty.
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confi
If I understand you correctly I think you can use, getenv() of get the IP
address of the user.
alex hogan
> -Original Message-
> From: :: n a s s a t :: Depto Tecnico [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 05, 2004 8:02 AM
> To: php-ayuda
> Subject: [PH
> you can only concatenate string with scalars (actually only strings, but
> php do some conversions...)
> if $questions is an array, you cant do that, and if its a string, you
> cant foreach it
> didnt you mean *VALUES (1, '$question', 1)"; ?
>
>
> maybe im
Well that fixed the error from coming up, but now the values in the db are
empty. I don't even get "Array".
alex hogan
> -Original Message-
> From: Andre Cerqueira [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 03, 2004 9:34 AM
> To: [EMAIL PROTECTED
x27;, 1)";
$result = MSSQL_QUERY($insert_query) or die("Can not execute query
$insert_query. ");
The value in the db is either "Array" or part of the string but not the
whole string. I know the error is creating most of the problem.
I can't see what I'm do
I need to take some surveys that contain complicated question answer
schemes.
Does anyone know of a good survey script (preferable), or some good
tutorials they can point me to?
I would like to find something that is free;->
alex ho
You also forgot to close your "if statement".
while ... and ... {
if (($pic_num + 1) <= $thumb_num) {
$tab = ((($pics * $page) - 1) + $pic_num); }
alex
> -Original Message-
> From: Paul Furman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 19, 2004 11:33 AM
> To: [EMAIL
Did you close your loop?
while ... and ... {
if (($pic_num + 1) <= $thumb_num {
$tab = ((($pics * $page) - 1) + $pic_num);
}
}
alex
**
The contents of this e-mail and any files transmitted with it are
confidential
tch_array($result)){
if ($pdate != $row[0]) {
print "" . $row[0]";
$pdate = $row[0];
}
print "" . $row[1] . "";
}
Results;
Date 1
Item one
Item two
Item three
Date 2
Item four
Item five
Item six
... etc
It produces the results that I was looking
Using print_r($var) shows that the vars are returning the right values, and
where they're supposed to. Right in between the error messages. Doh.
alex
**
The contents of this e-mail and any files transmitted with it are
con
1 - 100 of 135 matches
Mail list logo