x27;t find out after digging through books
and googling, is how / where to actually declare the
variable.
Seems most of the examples use a variable that is set
already by the programmer, not by the user.
Stuart
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
> I cant figure out if
; [4] => ) 1
FYI - The skills is a string, skys and slus ints.
Also I had only filled in 3 of the 5 for each.
Thank you
Stuart
--- Robby Russell <[EMAIL PROTECTED]> wrote:
> On Sun, 2004-10-17 at 09:53 -0700, Stuart Felenstein
> wrote:
> > I have 3 arrays. 3 for 3 fiel
ROTECTED]> wrote:
> On Sun, 2004-10-17 at 12:40 -0700, Stuart Felenstein
> wrote:
> > Robby
> >
> > Here is the printout :
> > Using-
> > print_r ($skills);
> > print_r ($skys);
> > print_r ($slus);
> >
> >
> > Array ( [0]
you ,
Stuart
--- Robby Russell <[EMAIL PROTECTED]> wrote:
> On Sun, 2004-10-17 at 13:08 -0700, Stuart Felenstein
> wrote:
> > They are related in the sense that they are part
> of
> > one record in the database.
> > Fields
> > Skill YearsUsed LastU
ky'];
The second dropdown is:
$_SESSION['slus'] = $_POST['slu'];
So I need to grab the input and
enter into database
where each set of skill, sky , slu is a new record.
I hope this is clearer.
Stuart
--- John Holmes <[EMAIL PROTECTED]> wrote:
> Stuart Felen
Not working.
> foreach($_SESSION['skills'] as $key => $skill)
> {
>$query = "INSERT INTO table (skill, sky, sku)
> VALUES ('$skill',
>
{$_SESSION['skys'][$key]},{$_SESSION['slus'][$key]})";
>//run query
> }
The foreach is generating an invalid argument.
I'm just going to show again what
Wish I had better news.
Warning: Invalid argument supplied for foreach() in
/home/lurkkcom/public_html/TestMultiTrans2.php on line
90
INSERT INTO LurkProfiles_Skicerts (ProfileID,
SkilCerts, NumYear, Lused) VALUES ()
line 90: foreach($skills as $key => $skill)
To confirm :
I changed to this:
Guess what , it's working !
The key (after yours and John's iteration lines)
was adding these into the script:
> $skills = $_SESSION['skills'];
> $skys = $_SESSION['skys'];
> $slus = $_SESSION['slus'];
A big thank you! to all who helped out here and for
hanging in.
Graham, thank you for continui
; the same script(s) on 2 lists.
>
> What is the current situation? Iterating through the
> 3 arrays or inserting
> into MySQL?
>
> Graham
>
> > -Original Message-
> > From: Stuart Felenstein
> [mailto:[EMAIL PROTECTED]
> > Sent: 17 October 2004 16:14
I have a multi-page form that ends in the last page as
a transaction to mysql. In the transaction there are
a number of steps, i.e.
query1 = Insert into "..
run query1
query2 = Insert into ".
run query 2
query3 = Insert into "..
run query 3
Then an if / else statement tha
If it's okay I'll throw out two more questions then.
1-Probably a silly question, but is a "faux pas" if I
don't do client side [javascript] validations ?
2a- Textboxes - provided I'm not allowing special
characters (only alphanumeric) does this alone protect
me from things like "sql injections
means.
>
> HTH
> Graham
>
> > -Original Message-
> > From: Stuart Felenstein
> [mailto:[EMAIL PROTECTED]
> > Sent: 19 October 2004 10:26
> > To: Graham Cossey; [EMAIL PROTECTED]
> > Subject: RE: [PHP] Help: Suggestions for multi
> pag
Best way for me to explain this is by example -
I just applied for a job and cut and past my resume
into a textarea.
After submitting it had extracted all the information
and placed them into textfields. So my first name was
now in the first name textfield, city was in the city
field.
Also , work
After some back and forth posts here I had finally
thought my array issue was over, but!
To review I have 30 form elements on a page
10 are skill[]
10 are sky[]
10 are slu[]
I pass them as session variables
$_SESSION['skills'] = $_POST['skill'];
$_SESSION['skys'] = $_POST['sky'];
$_SESSION['slu
p
>
> HTH
> Graham
>
>
> > -Original Message-
> > From: Stuart Felenstein
> [mailto:[EMAIL PROTECTED]
> > Sent: 20 October 2004 13:35
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Validation problem with array.
> >
> >
> > Aft
t;
> Also, this line :
>
> foreach($_SESSION['skills'] as $key => $skill)
>
> could read
>
> foreach($skills as $key => $skill)
>
> as you have the line:
>
> $skills = $_SESSION['skills'];
>
> Same for skys and slus.
>
> Gr
= array_keys($skills);
> foreach($skillNames as $skill) {
> echo 'Skill: '.$skill.' Value: '.$skills[$skill].'
> ';
> }
>
> Of course, instead of echoing you would do your
> validation or
> substitution.
>
> On Oct 20, 2004, at 8:35 AM, S
,
> skill[1]. You are creating
> an associative array when you do that. In and input
> form, skill[0] and
> skill[a] are actually no different, aside from the
> name you are using
> for that element.
>
>
> On Oct 20, 2004, at 9:41 AM, Stuart Felenstein
> wrote:
>
See below:
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> Also, this line :
> foreach($_SESSION['skills'] as $key => $skill)
> could read
> foreach($skills as $key => $skill)
> as you have the line:
> $skills = $_SESSION['skills'];
> Same for skys and slus.
> Graham
Graham,
I've read this over a
You mean why do i have $_SESSION['skills'] in the
foreach ?
Stuart
--- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> Hi Stuart,
>
> I haven't followed your thread too closely, but I
> did see something that might
> be the cause of your problems:
>
> [snip]
>
> > Let me show you how I set it all up
Graham, I'm going to make those changes. Not sure if
that was creating some crazy behaviour. See inline:
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> > {
> if ($skill != '') // Has this skill been
> entered?
I don't know if I care if it's been entered. My main
concern wo
See inline:
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> > In other words I need to figure out how to check
> > that each "line" is complete. right now, it is
> > matching all the values/inputs correctly. If
> > someone just chose a slus, seems the database
> But is this due to the sql stateme
Hope this is not off topic, and it might be a dumb
question, but I'm new.
For drop down menus, list boxes, selects etc, would
validation be needed to check the string , say for
special characters ? (as a security precaution)
Thank
Stuart
--
PHP General Mailing List (http://www.php.net/)
To uns
Graham,
Thank you. Actually , you suggested this site to me
the other day and it's great! I have read through a
number of documents and have a few more to get
through.
How would a hacker pass an HTTP message ?
That is interesting.
Stuart
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> [snip]
I just remembered something (smacks myself in the
head)
In both my multi select and select menus I use dynamic
options (meaning the options available come from a
table. So:
Table for states would look like this:
+--+---+
| StateID | State [Label|
+--+-
I have rows of input fields
Each row contains 3 fields. The user must fill out
the entire row (all 3 fields) for things to work
right.
I want to generate an error in case they have only
filled in 1 or 2 of the boxes.
Thinking I might use something like this:
foreach($skills as $key => $skill)
Yes, I think that will work, as soon as I can figure
out where on the page it should go. On error should
post to itself, on success it moves to next page.
I put the loop on top and am getting an invalid
argument for the foreach.
Stuart
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:
> In which case
I put the loop at the top of the next page, before any
output to the browser:
http://www.2soon2show.com/TestMulti4a.php"; );
print "You have errors";
}
}
?>
Before I added the redirect the print worked (and yes
it doesn't belong in that part of the loop)
Now the redirect is working , but
I'm not quite sure how to get an error message to
print out after a redirect. I know it's possible.
Now page1 moves to page2, check below is on page2
If I leave it on page2 (without redirect), it prints
error to user fine. Once it redirects no print.
I also tried leaving it on form1, at the top
Now why didn't I think of that ! Thank you Jay!
Stuart
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
>{
> header("Location:
> http://www.xx.com/page1.php";
> );
> print "You have errors";
> exit;
>}
>
> }
> [/snip]
>
> You either need to carry info about the
This isn't working:
Page2 (after page1 has been posted):
else
{
$_SESSION['er'] = 'Please make sure to fill in all 3
corresponding values .';
header("Location:
http://www.x.com/TestMulti4a.php"; );
exit;
}
}
Page1:
Opening after session_start
$_SESSION['er']
Sorry, all fixed now!
Thank you for the help!
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
See below:
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> What are you trying to do here?
> Is 'Page1' == TestMulti4a.php?
> Are you trying to display $_SESSION['er'] as set in
> Page2?
> If so why are you assigning $_POST['er'] to
> $_SESSION['er']? All you need to
> do is echo $_SESSION['er'].
>
The only problem I'm having here is that if a user
goes backwards, the error from the session variable
will show up. I put an unset $.. underneath the
echo but that seems to have no effect.
Stuart
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
> See below:
> --- J
Brent - Thank you I will try that method.
Can you elaborate more on below. I take it to mean you
have one page/script that your pages are going to do
all the checks.
This form is 5 pages long. So I chose session
variables just to keep it neat and "maybe", more
secure.
Stuart
--- Brent Baisl
I've tried about everything and have analyzed every
bit of code but I can't seem to resolve this issue. It
might be off topic since I can't say for sure if this
is a php problem.
The issue - I have a multi page form. One page seems
to throw a wrench in the whole process every time I
make a simple
--- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> Stuart,
>
> I'm no expert, but did you flush your browser?
>
> Hth,
> Andre
>
Andre, thank you for the response. I'm not sure what
you mean by flush the browser ?
Here is what I've been doing. First, I have denied
cookies from the site. Second
--- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> Stuart,
>
> Go to your browser settings, under 'Cache' (or
> something similar) then clear
> the cache. I struggled with a similar problem for
> days . . .
>
> Andre
>
I did that, and didn't change the situation. Also I
think the fact that using t
Call off the troops. I reconstructed the form, step
by step checking each step. All seems to be working.
Stuart
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
>
> --- Andre Dubuc <[EMAIL PROTECTED]> wrote:
> > Stuart,
> >
> > Go to your browser setti
I have created a database search and results set.
Things seem to work fine until I add the join
statements into the results page query string.
If I don't use the joins , the search works great. It
returns the correct results based on the criteria
input. If I add the joins in, then basically all
Wow~! I'm getting good.
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
> I have created a database search and results set.
> Things seem to work fine until I add the join
> statements into the results page query string.
> If I don't use the joins , the search work
Ooops, not solved yet.
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
I have created a database search and results set.
Things seem to work fine until I add the join
statements into the results page query string.
If I don't use the joins , the search works great. It
returns
Having some odd behaviour.
First , let me mention this is a multi page form using
session variables. (This might be important)
So I am doing a page by page validation, and have
tried putting the code before session_start or after.
Either way my session variables are getting lost.
Now in order t
rote:
> Without seeing the code:
> Try putting session_start() at the VERY beginning.
> Also try having the
> action go to the page itself ($PHP_SELF or putting
> in the path). Is the
> session variables being set using $SESSION['']?
>
> Respectfully,
> Ligaya
See inline:
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:
> The only circumstance under which I can think this
> might happen is if the
> session id is not being propagated by cookie --
> either because they're
> blocked in the browser, or because you have them
> switched off in php.ini.
They are
Yes I do have session_start on every page at the top.
Stuart
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:
> Stuart Felenstein wrote:
> > Yes the session variables are set with
> $SESSION[''}.
> > The way it works is the variable gets set on the
> > foll
Okay, I altered the code. Same thing, session
variables gone.
I then deleted the "session only" cookie. Also took
the rule out in the browser , so browser is accepting
all cookies from site.
Still no change.
Not to be redundant but here is the code again:(I
xxx'ed out some fields in the restrict
--- Chris Shiflett <[EMAIL PROTECTED]> wrote:
> So, the first thing to try is using a proper
> Location header:
>
> header('Location: http://example.org/success.php');
>
> Hope that helps.
>
> Chris
>
Thank Chris , but met with same behaviour.
2 Questions:
1- Should I drop the $url line ? I tr
esult($WAFV_Redirect,$WAFV_Errors,"page2");
or is it solely in:
session_write_close()
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$url = "TestMulti3.php";
Header ('Location: http://www.mysite.com/page3.php);
Thank you ,
Stuart
--- Jason Wong <[EM
--- Chris Shiflett <[EMAIL PROTECTED]> wrote:
> On each page, it might be good to add some debugging
> information near the
> top (where session_start() is):
>
> session_start();
> echo '' . htmlentities(print_r($_COOKIE, true))
> . '';
> echo '' . htmlentities(print_r($_GET, true)) .
> '';
> e
--- Chris Shiflett <[EMAIL PROTECTED]> wrote:
> This is most likely due to your malformed Location
> header. It requires an
> absolute URL, and some browsers (notably several
> versions of IE, but there
> may be others) do not send the proper Cookie header
> when requesting the
> new URL if you us
I guess this was the one thing I overlooked.
Since the page had to return to itself if validation
errors, it was already set in the validation script to
do so. So, as I had shown in my original post the
form action was blank ..well ""
Simple solution to keeping my session vars, set action
to pa
I guess my resolution was a fluke.
Recap: Adding validation kills my session variables
Now I tested a few things, SID is consistent across
pages, so a new sid and cookie are not being
generated.
Perhaps it's a bug, Im on PHP 4.3.8
Here is the code again, perhaps something will jump
out.
htt
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> I think we need to know what happens when this
> function returns the user to
> the script upon finding an error. Are all the form
> field values passed back?
Doesn't seem that they are. I tripped an error on
page1 , had an echo set for the first s
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> I think we need to know what happens when this
> function returns the user to
> the script upon finding an error. Are all the form
> field values passed back?
> Does it do anything at all with the session? Does it
> pass the SID?
>
I want to append m
I want to do a server side trap if a user selects more
from a mult select list then allowed. Just unsure and
didn't find any examples. Seems people rely more on
javascript these days.
So here is how I grab the array:
if ( is_array( $_REQUEST['LurkerIndustry'] ) ) {
$_SESSION['l_industry'] = a
--- Reinhart Viane <[EMAIL PROTECTED]> wrote:
> I would choose javascript to to check this
>
This response I don't understand. There are 50
options and the intent is to allow 3 of those 50.
Then some "genius" comes along and turns off
javascripting and chooses all 50. I KNOW it will
happen.
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> What is not to understand here...you are the one who
> said, "I want to do
> a server side trap". JavaScript would be the only
> way to do that.
Sorry, I used the wrong terminology. I think my
statement was interpreted as using javascript at the
s
--- Greg Donald <[EMAIL PROTECTED]> wrote:
> Bah.. Mountain Dew and a couple of Sudafed is where
> it's at. :)
>
>
That just doesn't sound right.
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I had this thread going yesterday. Then basically
think it reached a stalemate. I'm wondering has
anyone setup forms using session variables and
validation. Validation where the validating is done
on the same page, and the redirected on success ?
Maybe that is my problem , that session variable
--- Chris Shiflett <[EMAIL PROTECTED]> wrote:
> --- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
> > I had this thread going yesterday. Then basically
> > think it reached a stalemate.
>
> I think you need to try to simplify your code to the
> most basic exa
--- Graham Cossey <[EMAIL PROTECTED]> wrote:
> So, if this is the result of a form submission how
> are you getting the POST
> variables?
> How/where is $industry being set? I appears that you
> are assuming that
> variables are 'maintained' within a script, they are
> not. You have to
> remembe
--- Angelo Zanetti <[EMAIL PROTECTED]> wrote:
[snip]
session_start();
$_SESSION['foo']= "screw all this political bullsh1t!
who cares about the americans, they are just after
oil and I dont care as long as bush doesnt win.
long live iraq!!!";
unset($foo);
session_destroy();
-
I think I've tried just about everything that I found
googling. Still no luck. I'm throwing this out again,
with the chance that something missed before maybe
noticed.
Page 1:
//Start the Session - begin Block
@session_start();
Page 2:
//Start the Session - begin Block
@session_start();
//Set
--- Richard Davey <[EMAIL PROTECTED]> wrote:
> Unless I'm mistaken - you are redirecting back to
> Page 2 upon an
> error, right? Well according to the code posted, the
> second you hit
> Page 2 again, you are over-writing whatever is in
> the f1a session
> variable with the contents of the $_POS
--- Richard Davey <[EMAIL PROTECTED]> wrote:
> Before setting the session value in Page 2, check
> for the existence of
> the $_POST value first.
>
> if (isset($_POST['var']))
> {
>$_SESSION['var'] = $_POST['var'];
> }
>
> When you now redirect to Page 2 upon an error, it'll
> skip this blo
--- Reinhart Viane <[EMAIL PROTECTED]> wrote:
> Suppose Richard means:
>
> If (isset($_POST['ListingName'])) {
> $_SESSION['f1a'] = $_POST['ListingName'];
> }
Right, I've tried all three variations , none of
which, I'm sorry to report, have helped.
The variable is alive with any of the code i
--- Reinhart Viane <[EMAIL PROTECTED]> wrote:
> So, if I understand correct, even with the isset
> code on the second page
> $_SESSION['f1a'] is set to empty?
> That's strange.
> Still I wonder why you are inputting the error
> messages and the redirect
> in a session variable.
>
Yes, the isset
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:
> > Page3:
> >
> > if (count($LurkerIndustry) > 5) {
> > $_SESSION['arrayerr'] = "you have selected too
> many industries";
> > $_SESSION['f1a'] = $_POST['ListingName'];
> > header ("Location: TestMulti2.php");
> > exit;
> > }
>
> Well, that's even wo
--- Richard Davey <[EMAIL PROTECTED]> wrote:
> Try sticking this on Page 2 (ensure you have a
> session_start() at the
> top of the page and that you replace the 'var' text
> below with the
> correct ones.
>
> if (isset($_POST['var']))
> {
>echo 'POST value found, setting the session var
> n
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:
> Page 3:
>
>if (count($myarray) > 5):
> $_SESSION['arrayerr'] = "you have selected too
> many industries";
> session_write_close();
> header ("Location: Page2.php?".SID);
> exit;
>endif;
>
> Hope this helps.
Mike, once
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> Maybe what you had before was:
>
> if (count($myarray) > 5)
>$_SESSION['arrayerr'] = "you have selected
> too many industries";
>session_write_close();
>header ("Location: Page2.php?".SID);
>exit;
>
> And yes that h
I have a field that is an actual Mysql Text column,
aka like a blob. I'm wondering if doing a standard
validation that checks for characters outside of the
alphanumeric range is enough. I'm imagining some
users will cut and paste from a Word or PDF doc into
the field. I've done it myself and no w
It's a mysql text field.
Stuart
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> Any thoughts ?
> [/snip]
>
> I thought I'd have lunch today, but I didn't.
>
> Is it a 'text' data type, or 'BLOB', (you said,
> "actual Mysql Text
> column, aka like a blob") because the distinction is
> ne
--- "Vail, Warren" <[EMAIL PROTECTED]> wrote:
> I also don't know if MySQL will police things input
> to a text column to make
> sure they are valid ascii text characters.
>
No Mysql won't do it. PHP validation would have to be
involved.
Stuart
--
PHP General Mailing List (http://www.php.net
May I ask why you are suggesting this function ?
Stuart
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> It's a mysql text field.
> [/snip]
>
> You can use htmlentities() on the information placed
> into the field
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe,
--- Jay Blanchard
<[EMAIL PROTECTED]> wrote:
> [snip]
> May I ask why you are suggesting this function ?
>
> > You can use htmlentities() on the information
> placed
> [/snip]
>
> Because it will convert things like quotes into
> their HTML counterparts
> before you place them into the table.
I
--- Ben Ramsey <[EMAIL PROTECTED]> wrote:
> You should also use mysql_real_escape_string() on
> the data from the client.
Even though Magic Quotes GPC is turned on ?
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm reading PHP security paper by Chris Shiflett.
Trying to figure out what is meant by first
initializing a variable.
Now, just for the record, I'm not completely dumb.
I know you can start with a
$var = 2
What I want to know is if the variable assignment is
unknown, as in a user form.
Would
First I'm a bit unsure , because in the manual it
states that you must use mysql_real_escape_string on
binary data. So first question, what constitutues
binary data, a file or just an integer?
Second question - Since magic_quote_gpc is enabled on
my server (and I have no choice) - I gather I must
--- "M. Sokolewicz" <[EMAIL PROTECTED]> wrote:
(http://www.php.net/manual/en/function.mysql-real-escape-string.php)
I have my eye on example 3: The Quote_Smart function.
Do I have to list all the variables out though or is
there a way to have it check everything passing
through ?
What would ni
I've started getting into the habit of passing error
messages through session variables, particularly on
redirects.
>From some peoples reaction on this list I gather it's
not the best practice.
What is an alternative way ? I believe it's through a
URL. not sure how to go about that method
Stuart
--- Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
> I'm not quite getting what you're saying - are you
> sending the error
> messages on to a new page?! The usual and simple way
> of doing this is
> the good 'ol OR operator:
>
I'm saying, currently if there is an error and the
script needs to
--- Daniel Schierbeck <[EMAIL PROTECTED]> wrote:
> Where are you redirecting the client to? An error
> page?
Either an error page or back out to a main page.
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have 3 arrays. 3 for 3 fields in a table (all part
of 1 record)
array1 - field1
array2 - field2
array3 - field3
What I've been doing which works good with one array:
if ( is_array( $_SESSION['foo'] ) ) {
foreach ( $_SESSION['foo'] as $x ) {
sql .= "INSERT INTO TABLE (...
I asked a question yesterday about this but I think my
question is now more fine tuned:
Right now I have about 50+ session variables that will
be inserted into my mysql database in a transaction.
I need to do the mysql_real_escape_string and because
magic_quotes_gpc is turned on stripslashes as w
--- Jordi Canals <[EMAIL PROTECTED]> wrote:
> In the manual
>
http://es2.php.net/manual/en/function.get-magic-quotes-gpc.php
> you have an example just for that. Take a look to
> the Example 2.
>
Ok, that makes sense. Thank you .
Stuart
--
PHP General Mailing List (http://www.php.net/)
To u
--- Stuart Felenstein <[EMAIL PROTECTED]> wrote:
On second thought, I have a question. What is the
$value in the example ?
Does that mean I put in my own values ?
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> 2) Lookup array_map() and understand what it does.
>
> 3) stripslashes_deep() is a recursive function (ie.
> it calls itself). You
> should find a good tutorial on recursive functions
> to learn exactly what it
> does.
Thank you Jason.
Another thi
This array_walk() looks like a good function
Would this be a legitimate call:
array_walk($myarray, 'mysql_real_escape_string');
?
Thank you,
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can anyone give me a clue what I have done wrong here.
//These would be passed as ints:
array_walk($l_industry, 'mysql_escape_string');
Warning: Wrong parameter count for
mysql_escape_string() in
/xxx//public_html/Test2.php on line 104
//These would be passed as ints:
array_walk($l_tterm, 'my
Say I have a script that processes input data. How do
I get the script to work, where after processing the
user is taken to another page ? The script outputs
nothing to the screen and will end either in failure
or success.
Seems header won't work for me.
Stuart
--
PHP General Mailing List
--- Richard Davey <[EMAIL PROTECTED]> wrote:
some
> text or
>white-space, aborting';
> }
> else
> {
> Richard Davey
I think white space is my problem. What causes white
space ?
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Never mind , I found it!
http://www.w3.org/
TR/xhtml1/DTD/xhtml1-transitional.dtd">
One of these days I'll master the header function ;)
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a form element which allows a user to go back
"x number of days" in the records.
$sql.=sprintf("SELECT * FROM records WHERE
Date_Sub(Curdate(), interval day) "$%s" <=
PostStart")
This formula works when I actually hardcode the number
of days in where this mess --> "$%s" is right now.
I
--- Ben Ramsey <[EMAIL PROTECTED]> wrote:
> I'm not exactly sure what the SQL statement you have
> above is supposed
> to do, but you could just do something like this:
>
> $curdate = date('Y-m-d H:i:s');
> $sql = "SELECT * FROM records WHERE '$curdate' <=
> PostStart;";
>
I'm having some pro
I am creating a database search form and results.
Running into a problem though.
I have two form elements, both that are fed by tables
that have int values (1, 2 , etc)
my sql statement is such:
SELECT vendorjobs.PostStart, vendorjobs.JobTitle,
vendorjobs.Industry, vendorjobs.VendorID,
vendorjobs
--- Jon Hill <[EMAIL PROTECTED]> wrote:
> You might want to try looking up the syntax for left
> join queries.
> I think this might be what you are after.
>
> http://dev.mysql.com/doc/mysql/en/JOIN.html
>
It has nothing to do with left joins. It works fine
provided I do one of two things, make
--- Jason Wong <[EMAIL PROTECTED]> wrote:
> Why not build your sql query according to whether or
> not whatever you want is
> selected or not. That way debugging is easier as
> you won't be looking at
> queries that contain redundant "... AND 0 ...".
>
Jason, How would I do that ? Care to sh
I'm building a search function and I think most of the
search part is solid.
Now I'm trying to figure out the results part.
Since my results would return about 7 fields per
record, I'm thinking mysql_fetch_row over mysql
results works better ?
But I don't want every field from the row returned,
o
1 - 100 of 172 matches
Mail list logo