"$_SESSION['guesbook'] = $arr;"
is it safe to say that i can do this:
while($_SESSION['guestbook']=mysql_fetch_array($query)) to get the same
thing as $_SESSION[guestbook]=$R??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
figured out how to do the $_SESSION multi dim arry thing...
is it ok practice to put code like the code to put results from an mysql query into a
combo box into an include file and then just include it wherever its needed? the code
i can see would have to be used at least 5 times in the same page
hi...
i know this is a little ot but in an attempt to keep viruses off the list (i think)
somebody/something is forging an email in my name to the php mailing list as well as
mysql mailing list along with a few others. i get a message something like this:
"your message titled: submit your authe
hi...
i have the following code and i need to check to see if $_SESSION['guestbook'] has
been assigned to the session yet. if it has then use its values to create the combo
box...if it hasnt then run the sql query and assign it to the session as well as fill
the combo box with it... any ideas h
hi...
i have a combo box that is filled with a query from an sql table...
this is its logic:
if $_SESSION['guestbook'] doesnt exist
then query database, fill $_SESSION['guestbook'] with its values from the db, turn the
"value" part of the into the values from $_SESSION['guestbook']['Number'] an
hi...
i have the following html line:
accesskey="d"
id="id-referred">
the php variable $old['Referred'] was pulled from a mysql table. the full string that
this variable holds is "I work for you..." but when used as a default value in an
input text field for html the only part that shows up in
tnx that works now
- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, April 04, 2004 11:32 AM
Subject: Re: [PHP] php as default "value" in html
>
> --- Andy
"htmlentities(), also.
Other wise the value could have a double quote within it and a malicious
user could effectively "end" your input text box and inject their own HTML."
is there any way to keep multiple users using the same form from mixing up
variables
--
PHP General Mailing List (http://
> > is there any way to keep multiple users using the same form from mixing
up
> > variables
>>I have no idea what you mean here.
if user #1 logs in and starts using a form and then user #2 logs in and
starts using the same one as user #1, say by chance they submit it at the
same time... is there
how would you empty all the contents of $HTTP_SESSION_VARS when you dont need them
anymore but still keep the current session running? the problem seems to be that when
i try to fill them with something else (dont need the original values anymore) but
need new ones without destroying the session
"$HTTP_SESSION_VARS = array();"
doesnt work... it kills the session and forces me to login as soon as the
array is empty
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Umm.. Use $_SESSION for that.."
wish i could but it wont work for the server that its going to run
onthey still use php4.0.4pl1 believe it or not
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"Use the session_* functions then.."
still does nothing at all or it does the same as session_destroy. and that
forces a user back to the login screen right in the middle of an sql
insert/update
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
"When someone pulls up a form and fills it out, they subsequently submit
that
form. When submitting a form your browser creates a one on one connection
with the server where the server inputs the data from your form before or
after the next person without mixing the two. (no matter if the two
sub
"Okay, start showing some code so we can see wtf is going on. Constantly
posting back "nope", "doesn't work" is just going to have us grasping at
straws again and again.
Is register globals on or off?
"
register_globals=off
here is the code that gives me problems:
files are attached (if allowed)
"There are two problems there. First, your session data is not getting
cleared. Second, it is not getting reset with the new values.
For the former, in guestbook_save.php you can simply do a session_unset
(if you really want to clear all of them). However this does not
handle an abnormals equen
"On my personal machine the return value is:
1081026000"
interesting... i got 1081054800 from mine with the code:
even on cli it gives the same thing
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if you need to turn the result of mktime() into a valid mysql timestamp
format then put these 2 lines in your code when needed:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hi...
i cant cut and paste my exact mysql query because it takes the '' stuff out doubles
the $'s and the ,'s in the whole thing (dont know why but anyways...)...
i have a query that goes something like this:
mysql_query("insert into $GuestbookTable values(NULL, '$_SESSION[add][date]',
'$_SESSIO
> $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} ";
>
> oh, and unless add & name are actually constants you should always wrap
> them in single quotes. (php will covert the non-exstent constant into a
> string a issue an E_NOTICE + its overhead)
well that got me on the right track..
how would you assign NULL to a variable if its original value is ""? otherwise leave
it with its value...
the form im working on has a date field called "date" on the form itself. that "date"
will get turned into $_SESSION[add][date] on the next page...
i want it so if the person filling out the
i have the function i made:
function CreateDate($day, $month, $year) {
if(!empty($day) && !empty($month) && !empty($year)){
//convert $day, $month, and $year into a valid timestamp
$time= strtotime($day, mktime(0,0,0,$month,1,$year));
$time=date("YmdHis", $time);
return $time; }
else {
return false
>
> Replace the above two lines with
>
> $time = date('YmdHis', mktime(0,0,0,$month,$day,$year);
>
ok the function works now because when i echo the output of
$_SESSION['add']['start_date'] it shows the right 14 digit timestamp for the
date i wanted to create... now the problem is getting it to ec
"date() expects a UNIX timestamp. MMDDHHMMSS is NOT a UNIX timestamp.
So,
instead of converting the UNIX timestamp to MMDDHHMMSS in your function,
why not leave it a UNIX timestamp? Then you can send it through date()
whenever you want it formatted.
"
yea...it works now...hmmm... dont know
i have something like this:
if(!empty($_SESSION['add']['start_date']) &&
!empty($_SESSION['add']['end_date'])..)){
and i get the unexpected error:
notice:use of undefined constant: add-assumed 'add' in (filename).
dont quite understand why that is since i used other code that i have
hi...
i have 2 mysql queries
first one:
//the extra { at the beginning and the extra , at the end of
//each variable should be an '...
"insert into $EventsTable values(NULL, '{$_SESSION[add][type]}',
'{$_SESSION[add][start_date]}', '{$_SESSION[add][end_date]}',
'{$_SESSION[add][name]}', '{$
"two things i would recommend before disecting your code.
1. write readable queries.
GOOD:
$sql = "
SELECT
name
, age
, height
, etc
FROM user
WHERE
name = '$name'
AND height = '5'";
2. alway
"MINE:
$sql = "
SELECT
name
, age
, height
, etc
FROM user
WHERE
name = '$name'
AND height = '5'";"
um...im not doing selects im doing inserts with variable names... i
understand the idea with
ok query is fixed for the second one now... now to work on the
if(!empty.. tests
i have to check and make sure every one of those arrays isnt empty.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> He was showing you a neatly formatted query, the example applies to
> inserts too:
>
> $sql = "
> INSERT INTO
>tablename
>(
> field1,
> field2,
> field3
>)
> VALUES
> (
> '$blah',
> $here
> AB> 1. how were those queries unreadable?? and
>
> You're kidding, right?
sorry...my bad... never had any "writing readable code" help
anywhere...guess if i do it like c/c++ then it would work better
>
> AB> 2. whenever i put '' around the array keys in multi dimensional arrays
in a
> AB> query
>i was hoping that wouldn't cause any confusion, but i >guess it did. the
>thing to remember is that a query is a query. you know, >parts is parts.
oops stress and the fact that im sort of new at this stuff mixed me up...
$query="insert into table values(
'{$array['index1']['index2']}',
'{$array[
hi...
is it better to give the mysql query string to a variable instead of directly doing it
with mysql_query?
i.e.
$query="select * from table";//is this a better way?
$query=mysql_query("select * from table");//or is this way
//better?
mysql_query("select * from table");//not a good idea i do
hi...
i have a few things i need and dont know where to go to get some
ideas/examples of how to do some things:
1. i need to know how to take info from a mysql db load it into a dropdown
box and then select as the default choice whatever value was in the db: i.e.
i have a combo box with the month
hi...
i have this code:
Yes
No
was just wondering if that was the right way to determine the state of a
radio button...?
if the value of $old['Type']="Annual" then the yes button is checked...if
not then the no button is checked instead...
--
PHP General Mailing List (http://www.php.net/)
To u
i have this query set:
$EditQuery="select * from $EventsTable where Id='$edit'";
$query=mysql_query($EditQuery)||die(mysql_error());
//later in the code i have this:
while($old=mysql_fetch_array($query)){
//do stuff
}
when i run the page i get:
warning: supplied argument to mysql_fetch_array is not
>Assuming $old['Type'] somehow comes from >$_REQUEST['eventtype'] (or is
>related to it), then yeah, that'll work.
no its coming from a db result from fetch_array() of which im having an
interesting problem with right now but thats in another post
--
PHP General Mailing List (http://www.php.net/
>[snip]
>i have this query set:
>$EditQuery="select * from $EventsTable where >Id='$edit'";
>$query=mysql_query($EditQuery)||die(mysql_error());
>[/snip]
>
>You forgot the connection string arguement in >mysql_query
even after putting in my standard mysql_connect(.) stuff it still fails
now the
> I always found this way of inserting data into a database messy. Here is
> a handy function to do array inserts and it builds the sql for you.
>
> function arrayINSERT($a,$tablename)
> {
> $sql = "INSERT INTO $tablename (";
> foreach($a as $key => $value)
> {
> $sql .= $key .",";
> }
> $sql[strle
- Original Message -
From: "Daniel Clark" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 4:22 PM
Subject: Re: [PHP] radio buttons checked or not
> My understanding is if the va
hi...
is it totally usefull/reasonable to write a class in php that prints
different different form elements in html...
i.e. inputs, buttons, drop downs, multi selects and son? that way (at least
i think) then it would be easier to change the element attributes
dynamically...
--
PHP General Mai
- Original Message -
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Sent: Wednesday, April 07, 2004 6:30 PM
Subject: RE: [PHP] confused big time
Andy B <mailto:[EMAIL PROTECTED]>
on Wednesday, April 07, 2004 2:09
I have this very large and long if statement:
if
(!empty($_SESSION['add']['type'])
&& !empty($_SESSION['add']['start_date']
&& !empty($_SESSION['add']['end_date'])
&& !empty($_SESSION['add']['name'])
&& !empty($_SESSION['add']['county'])
&& !empty($_SESSION['add']['discription'])
&& !empty($
anybody know what the exact path for the php binary on linux is?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hp on linux
> * Thus wrote Andy B ([EMAIL PROTECTED]):
> > anybody know what the exact path for the php binary on linux is?
>
> Depends on how it was installed, a common place is:
> /usr/local/bin/php
>
> Or you can type:
> which php
>
> and it will tell y
;]['StartingDay'])
> && !empty($_SESSION['add']['StartingMonth'])
> && !empty($_SESSION['add']['StartingYear'])
> && !empty($_SESSION['add']['EndingDay']})
> && !empty($_SESSION['ad
hi
yesterday i posted a msg about wanting to know if it was a good idea to
write a class that created/dealt with html forms and so on... somebody told
me to go look at html_quick_forms class and it looks good like everything i
would want to do but there is 1 problem: is there any classes for the s
hi..
this might be sort of ot and out of the range of the list but i had a site
design question: is it an absolute no no to put inset borders 3px wide
around "EVERY" table on the section of the site?? im trying to make an
attempt at making the site have some sort of layout standards and that
happe
dont know what his deal is but ok will close this idea now i guess..
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Sent: Thursday, April 08, 2004 7:41 AM
Subject: Re: [PHP] page design and possible confl
hi...
i have a page called ViewEvents.php. at the top of the page and at the
bottom of the page there is a bar with links on them jan-dec and view all.
all 13 links are supposed to call the same page(ViewEvents.php) each link
with a different query string. for example:
jan=ViewEvents.php?request_m
www.php.net/manual/ might help
- Original Message -
From: "Ash.." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 5:34 AM
Subject: [PHP] Looking for a comprehensive PHP tutorial
> Hi,
>
> I am looking for a comprehensive handholder tutorial, that introduces the
hi...
im writing this admin system for a website and need to have it write system
logs to its own log files... the only problem i can really see is that its
on a shared webserver and all files are restricted to your own domain/vhost
dirs (whatever those happen to be). the admin wont let anybody pu
> You don't have access to anything outside of the webroot? If
/home/user/www/
> is your webroot, then write them to /home/user/. If you're saying you
can't
> do that and they have to be put under the webroot, then give them .php
> extensions and make the first line
>
>
>
> Then they can't be view
i have this sort of a log string:
error_log("\n".$date.":".$_SESSION['username'].":Logged in:normal login\n",
3, $LogPath."admin.log");
problem is when it writes the entry in a file the first one shows up fine
but when you get 2 or more in it then it either strings the lines together
(the second e
everything works now tnx
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 09, 2004 10:45 AM
Subject: RE: [PHP] "\n" doesnt work in error_log and wi
i just blocked them whatever they are but still dont need any strange stuff
going on...
somebody might want to check into a "pandasoft" autoresponder that keeps
answering my messages saying that the list couldnt accept them and it was
deleted and blocked because i have a virus?? i had people try s
Hi.
I was just wondering where I can find info on how to use a MultiSelect List
Box with PHP? I need to use it with MYSQL 5.0.0, PHP 4.3.9, and windows XP
sp2.
Any help/leads would be greatly appreciated.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.ne
creen??
-Original Message-
From: Eric Lee [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 31, 2004 3:06 AM
To: Andy B
Subject: Re: [PHP] MultiSelect List Box in PHP
it's just likes you used in normal html & javascript,
but the code that generated to control the ui are now moved t
I need to be able to print the selected items without the "array..." thing
around it. so example would be if 1 and 2 are selected it would print:
1, 2
it's supposed to be formatted for the user...
-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED]
Sent: Sunday, Octobe
27;t being built right... you can
change it to work with your db just change the connect string and the field
list from a db to test it...
-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 31, 2004 4:14 PM
To: Andy B
Cc: PHP mailing list
Subject
Hi.
Is there any GUI editors out there for php? if so does anybody know of a
good one that doesnt cost a ton of money??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
101 - 162 of 162 matches
Mail list logo