Hi All,
I am on a 2K Server with SQL Server 2K and will have a lot of questions on
PHP during development.
Is this the right list?
alex hogan
**
The contents of this e-mail and any files transmitted with it
Hi Richard,
Thanks for the welcome.
They will be PHP related I assure you. I'm a newbe
alex
> -Original Message-
> From: Richard Davey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 15, 2004 9:03 AM
> To: Alex Hogan
> Cc: PHP General list
> Subject: Re:
another list.
I can see that populating those drop downs like this is going to cause me
tremendous problems in the future.
I know there is an easier way to do this. I wish I could think of it right
now. any assistance would be appreciated.
alex hogan
How do you insert a php variable into a javascript function?
For instance;
function redirect() { location = ; }
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and
_SESSION['obj[4]'] = $_REQUEST['txtObj4'];
$_SESSION['obj[5]'] = $_REQUEST['txtObj5'];
$i = 1;
while ($i <= 5) {
$obj_ar[$i] = $_SESSION['obj[$i]']$i++;
}
I keep getting this error;
Parse erro
Line 24 is: $obj_ar[$i] = $_SESSION['obj[$i]']$i++;
Alex
> -Original Message-
> From: Jake McHenry [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 16, 2004 3:31 PM
> To: Alex Hogan
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Can I do
Tried it now I get;
Parse error: parse error, unexpected T_VARIABLE in mypage.php on line 22
Line 22 is $i++;
> Try this:
>
> while ($i <= 5) {
> $obj_ar[$i] = $_SESSION['obj[$i]'];
> $i++;
> }
**
The con
Thanks..
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 16, 2004 4:29 PM
> To: Alex Hogan
> Cc: PHP General list
> Subject: Re: [PHP] Can I do this? If so why wont it work
>
> Alex Hogan wrote:
> > I am want
x27;m using an ADO connection.
$db = "C:\\inetpub\\wwwroot\\proto1\\data\\example_one.mdb";
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".$db);
I would like to make the $db a virtual path.
alex hogan
*
this is the way of
setting and retrieving session objects, right?
I have tried calling that session object again but it's empty and so is the
variable. I thought that the session would stay open until I close the
browser and I could return those values any time
[EMAIL PROTECTED]
> Sent: Tuesday, January 20, 2004 12:31 PM
> To: 'Alex Hogan'; 'PHP General list'
> Subject: RE: [PHP] $_SESSION
>
> You need to call session_start() on each page.
>
> > -Original Message-
> > From: Alex Hogan [mailto:[EM
Oopps, my bad. sorry.
That worked like a champ...
Thanks...,
I'll sulk off now...
> -Original Message-
> From: Aaron Wolski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 20, 2004 12:46 PM
> To: 'Alex Hogan'; 'PHP General list'
&g
Can some one point me in the right direction for a good tutorial on form
validation in PHP?
Thanks,
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for
Is there a way to create thumbnails of web pages?
I have a page where the user will select a template from a list and I would
like to be able to give them thumbs to associate with the template types.
alex hogan
cs have to change accordingly.
Am I chasing my tail here?
alex
> -Original Message-
> From: Brian V Bonini [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 21, 2004 10:59 AM
> To: Alex Hogan
> Cc: PHP General list
> Subject: Re: [PHP] web page thumbs
>
> On We
Sorry for the bombardment of questions.
[code]
[/code]
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
8 PM
> To: Alex Hogan
> Cc: PHP General list
> Subject: Re: Form woes
>
> Alex,
>
> A switch statement probable isn't the way you want to do this. There is
> no real limit to how many of anything should go in a page, but there are
> likely better ways to skin thi
correct?
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
nec
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
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
**
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
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
> 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.
[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
[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
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
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
[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?
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
> 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
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
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
> 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
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
> 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
you talking about something else?
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
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
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
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
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
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
[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
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]
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
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
--
else{
break;
}
}
alex hogan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
[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 ( $
[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
> 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
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
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
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
#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
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
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
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
> 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
**
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
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
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
[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
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
; 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
if there is a simplier way please let
me know.
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
Hi All,
I have a printer friendly page and I want to get rid of the referring url at
the bottom of the page. How can I do this? I can't seem to find any
reference to this in the archives.
alex hogan
**
Thanks.,
alex
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 03, 2004 1:27 PM
> To: Alex Hogan; PHP General list
> Subject: Re: [PHP] Printer Friendly pages
>
> From: "Alex Hogan" <[EMAIL PROTECTED]
Hi,
I have a printer friendly page that is passed a url param from the detail
page. On the detail page I have a series of questions that appear as they
should. However when I go to the printer friendly page I'm missing the
first question. I get all the others. I can't seem to find a reason
You didn't close your loop;
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $file;
}
#vardump ($pictures[]);
} <= here
?>
instead of;
while ($file = readdir($dh)){
if (strstr ($file, '.jpg')){
$pictures[] = $fi
Are you saying that it's better not to use relative paths on include(...)'s,
require(...)'s and their (x)_once(...) cousins?
That seems awkward to me.
Why would I want to hard code a path, even if I was including additional
functionality from another file?
> -Original Message-
> From:
Hi Richard,
> Why not just set a $basedir value somewhere and always use that in an
> include/require function: include "$basedir/sub/whatever" - then no
> matter where it's called from it'll never be wrong.
That makes sense...
Is it also recommended that an application local config file be used
How large can that file be?
I have a func.php file that I'm putting all my reusable functions in but I
can see that getting pretty large if this project starts getting eaten up
with feature creep, er.., I mean additional functionality. (I know that'll
never happen...;->)
So how large is too large
Session_start() has to be the first thing at the top of the page before
anything else. Even header info.
I just got this answered for me about two weeks ago
> -Original Message-
> From: Donpro [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 11, 2004 10:20 AM
> To: php list
> S
L PROTECTED]
> Sent: Wednesday, February 11, 2004 11:00 AM
> To: 'Alex Hogan'; php list
> Subject: RE: [PHP] Sessions on Win2k
>
> On 11 February 2004 16:39, Alex Hogan contributed these pearls of wisdom:
>
> > Session_start() has to be the first thing at the top o
HAND?
I haven't seen that one...
> -Original Message-
> From: David T-G [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 12, 2004 11:34 AM
> To: PHP General list
> Cc: Jeremy Schroeder
> Subject: Re: [PHP] A dumb question
>
> Jeremy --
>
> You have started a new thread by taking an
Try...,
if($login == "successful"){
$url = "yourin.php";
}
else{
$url = "tryagain.php":
}
header("Location: $url");
alex
> -Original Message-
> From: Michael T. Peterson [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 13, 2004 3:03 PM
> To: [EMAIL PROTECTED]
> Subje
used in production environments.
Thanks,
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
You do have some nice scenery.
My son is in the Texas Boys Choir and they hosted the Drakensberg Boys
Choir. We are going to Drakensberg in the summer after Europe and can't
wait to see it other than pictures.
> -Original Message-
> From: Jakes [mailto:[EMAIL PROTECTED]
> Sent: Tuesday,
Funciton myfunc($var1, $var2){
.....
}
}
Why?
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the indiv
Hi All,
I've been banging my head for several hours now.
I've got a mssql backend.
What I want to display is;
Date 1
Item 1
Item 2
Item 3 ... etc
Date 2
Item 1
Item 2
Item 3 ... etc
Here's the code I've been fighting with;
$query = "select distinct wn_pdate
Sorry...,
Line 17 is: print "$row2[$rtxt]";
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.
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
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
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
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
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
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
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
> 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
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
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
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
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
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
>
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
1 - 100 of 135 matches
Mail list logo