shows NOTHING if I hit the BACK button. I'm still not seeing where the
logic error is which makes it so that when I hit the BACK button it
loses the plot.
Sorry for my misunderstanding
JJ
kgt
Jack Jackson wrote:
I've tried playing with the $_SERVER['HTTP_REFERER'
I've tried playing with the $_SERVER['HTTP_REFERER'] and that's no good
because it's all coming from the same page - index.php!!
What am I missing. . . ?
Jack Jackson wrote:
Hi Kristen, there's a misunderstanding:
Kristen G. Thorson wrote:
The code below isn&
Hi Kristen, there's a misunderstanding:
Kristen G. Thorson wrote:
The code below isn't much help to debug. Do some checking to figure out
how far into your IF statement you're getting. Is the query running?
Yes it runs successfully
Is it the query you expect?
Yes it is perfect, and pr
Hi, mark,
Mark Rees wrote:
> Do you want to allow people to go back and change things ?
> If so, write a suitable UPDATE statement
Thanks, but I think the update function should be built in -- the sql
checks whether the userAnswer table contains the q_id the user has just
entered; if so, it
Hi all. This has been an interesting week.
Now the form works, and I am able to error check, if no errors look into
user answer table and delete from that all q_ids matching the ones just
picked, insert this page of question/answer info (q_id/a_id) into the
user answer db, and if successful ad
d=values(a_id);
Query OK, 5 rows affected (0.01 sec)
Records: 4 Duplicates: 1 Warnings: 0
mysql>select * from user_answers;
+--+--+--+
| u_id | q_id | a_id |
+--+--+--+
|1 |1 |1 |
|1 |1 |2 |
|1 |1 |3 |
+--+--+--+
3 rows in set (0.00 sec)
Hi,
Thanks to everyone's help, that multipage monster of a form is now
working properly (yay!).
One problem I have though is that I stick the answers as each page is
completed into a table. If the user hits the back button, rather than
adding a new row to the table I'd rather update it if it'
loop, and then
I wondered why it only ran through once.
D'oh.
Jochem Maas wrote:
Jack Jackson wrote:
AAarg.
Okay, thanks to all of you I've decided that any field name I need to
see will be sent to $_SESSION['required_fields'] and basta.
Then after the submit butt
AAarg.
Okay, thanks to all of you I've decided that any field name I need to
see will be sent to $_SESSION['required_fields'] and basta.
Then after the submit button is pressed, I am doing this:
reset($_SESSION['required_fields']);
foreach ($_SESSION['required_fields'] as $fieldname)
It'd have to be in the form of a form and you'd need to add values to
the options, wrap it inside form tags, specify a method like $_POST or
$_GET, error check and then send.
Bruce Gilbert wrote:
can anyone give me an idea on how to return info. from a forl pulldown menu
eg:
Kristen G. Thorson wrote:
Thanks for the == !
But I had set $message global within the buld-checkbox function, so that
part of it does work. . . .
Jack,
Read below:
Jack Jackson wrote:
Hi,
Now that the drop down is working properly (thanks!!), I am trying to
validate, and
Jochem Maas wrote:
wtf are you smoking Jack? every checkbox that was checked will exist in the
$_POST array set with the value you gave it (I alway set a chekcboxes
value to 1
because the values mere existance in the submitted data indicates it's
chevckbox
was checked), if a checkbox does n
g.gill wrote:
From what I understand the simplest solution here would be to check to see
if you have $_POST['cb'] in the first place. That would indicate if
checkbox was selected or not. After, you have posted the form just do the
following test.
$check_box_exits = ((isset($_POST['cb']))?
David Robley wrote:
Jack Jackson wrote:
hi,
I have checkboxes beging dynamically generated. to seperate tasks in
error checking I have added he arrays not just to $_POST but to
$_POST[cb] so names (derived from question numbers) are for example:
$_POST[cb][7]
A dump of $_POST would
hi,
I have checkboxes beging dynamically generated. to seperate tasks in
error checking I have added he arrays not just to $_POST but to
$_POST[cb] so names (derived from question numbers) are for example:
$_POST[cb][7]
A dump of $_POST would therefore include something like
["cb"]=> array
I did the smart thing last night: nothing. I read some PHP books and
then realized that the answer to my error checking was a lot less
complex, once again, than I had initially suspected. I finally ended up
with:
//error checking
foreach($_POST as $qname=>$value) {
if(empty($value)){
}
//error checking
if ( !strcmp($action,'process') ) {
if(empty($_POST[$row['q_name']])){
$message[$row['q_name']] == "1";
}
}
}
}//function GetQuestionsDropdown
it
Hi,
Now that the drop down is working properly (thanks!!), I am trying to
validate, and having LOTS of trouble. After being ceaselessly derided
last night on an irc channel for my dimwitedness, I am still not any closer.
The code which works is this:
function GetQuestionsDropdown($cat){
//fir
Kristen G. Thorson wrote:
I'm not 100% sure where you're saying you're stuck, but I think you're
trying to do with one query what you will probably find is best to do
with several. Hopefully the following will help some:
//first get all the questions
$sql = "select * from questions";
$resu
Aaron,
Thanks for showing me this it is very cool indeed.
However maybe I am being dumb and obdurate but what I am really trying
to do is build some of these things myself (with, thankfully, help) so
that I understand enough that when I see a great tool like yours I'll
actually appreciate what
in most cases, it's still
better than what you'd have to do otherwise (create some arrays and do
some sorting, etc.). That is, if I've understood what you need ;)
kgt
Jack Jackson wrote:
Hi, can anyone even point me in a *direction*? I suppose this is the
most complex
eve in most cases, it's still
better than what you'd have to do otherwise (create some arrays and do
some sorting, etc.). That is, if I've understood what you need ;)
kgt
Jack Jackson wrote:
Hi, can anyone even point me in a *direction*? I suppose this is the
most complex t
etely baffled.
Jack Jackson wrote:
Hi,
because that last topic on multipage forms was so exciting, I decided
to
database the questions as well. I wonder if anyone can help me with a
function to pull rows into dropdown boxes.
It's a 1:n relationship between questions and answers, an
Hi, can anyone even point me in a *direction*? I suppose this is the
most complex thing I've ever tried to do and I have been at it for tens
of hours and am still completely baffled.
Jack Jackson wrote:
Hi,
because that last topic on multipage forms was so exciting, I decided to
dat
Hi,
because that last topic on multipage forms was so exciting, I decided to
database the questions as well. I wonder if anyone can help me with a
function to pull rows into dropdown boxes.
It's a 1:n relationship between questions and answers, and I have a
table of questions
q_id
q_name
q_
Mark Rees wrote:
"André Medeiros" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The point of sessions is that when you close your browser, you loose it.
I'm affraid that if you want sessions that last two weeks, you'll have
to make your own session handler :) but yeah, it's poss
The light dawns.
Thank you everyone for this explanation, and the help
JJ
Mark Rees wrote:
Jack Jackson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Somehow my intent has been turned around here and I apologise.
I do not want to use *any* client side validat
Marcus Bointon wrote:
On 27 Jul 2005, at 21:22, Jack Jackson wrote:
Right. Except I would rather have it working in a session because I
specifically do not want to have the form sending $_POST data back
and forth to the browser six times for several reasons. SO I'd like to
Page1 // U
Jim Moseby wrote:
-Original Message-
From: Jack Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 27, 2005 3:47 PM
To: php >> "[php] PHP General List"
Subject: Re: [PHP] Multipage form redux
hi, my first attempt at a sessions-based form is starting at
http://pas
($page2);
}
because that's keeping it all in one script. But how should I be getting
to the next page, sending headers to a new script, and at the end of the
chain the script which pulls it all together?
Thanks in advance,
JJ
Jack Jackson wrote:
Thanks everyone. I take the poi
Thanks everyone. I take the point of Andre, but believe that the depth
and sensitivity of the data require it be stored server side. I think
that Richard and Mark have put their fingers on it - it's gotta be
cookie based. Someone on the IRC suggested sessions and I think that it
the way it goes
Hi,
I have searched the archives and seen links to tutorials at phpclasses
(which seem to be down) and not found an answer to my question:
I have a long form I want to break into seven pages. Rather than pass
values from page to page as hidden, I'd rather write the results to the
db after each
Message -
From: "Jack Jackson" <[EMAIL PROTECTED]>
To: "[php] PHP General List"
Sent: Monday, July 25, 2005 2:37 PM
Subject: [PHP] Prepopulating form fields afer an error
Hi,
I have a form and it does basic error checking after submission; when
the user omits required f
Hi,
I have a form and it does basic error checking after submission; when
the user omits required fields it kicks back the form with highlighted
errors telling them the error of their ways.
I've sussed out that by populating the value of the field with
$fieldvalue I can have that form field "
Thanks for this Philip and Andre!
Philip Hallstrom wrote:
hi,
I'm providing a download script which lets trusted users view a
directory and select a file to download; I don't want to store the
files zipped on the server. Is there a fast, built-in way to zip the
selected file on the fly and le
hi,
I'm providing a download script which lets trusted users view a
directory and select a file to download; I don't want to store the files
zipped on the server. Is there a fast, built-in way to zip the selected
file on the fly and let the user download the zipped copy? I looked at
php.net/zi
Edward Vermillion wrote:
Sorry to reply to this message but I wanted the OP to find it too...
On Jun 23, 2005, at 9:42 AM, Jack Jackson wrote:
[snip]
Through your help I was able to validate image files using
getimagesize() and have made a nice script to upload and rename images.
[\snip
Thank you for ALL this great information, Richard! I really appreciate
all the help.
JJ
Richard Lynch wrote:
On Thu, June 23, 2005 7:42 am, Jack Jackson said:
I cannot see a way to validate or examine Word or Excel files for
validity (and assume that older word files would validate
Tom Rogers wrote:
Hi,
Friday, June 24, 2005, 12:42:33 AM, you wrote:
JJ> Hi,
JJ> I checked at
JJ> http://www.php.net/manual/en/features.file-upload.php and
JJ> all the user notes, and also the PEAR solution for uploading files and I
JJ> still have a couple of questions.
JJ> I need to create
John Nichel wrote:
Jack Jackson wrote:
Also, it seems that directories must be blown wide open (777) to allow
the script to copy the file over from /tmp. My ISP won't allow
directories to be set to 777 under public_html/ -- but we need to
access the files via web browser which is the
Hi,
I checked at http://www.php.net/manual/en/features.file-upload.php and
all the user notes, and also the PEAR solution for uploading files and I
still have a couple of questions.
I need to create a form to allow users to upload (and later to delete)
MS word, excel and jpg files. Through yo
Thanks everyone! I did look in the manual under operators and must have
missed the link to round. Thanks to all who replied!
Simon Allison wrote:
http://au3.php.net/round
-Original Message-
From: Jack Jackson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 22 June 2005 9:18 PM
To
Hello,
On a site I'm listing measurements in both inches and cm; in the db
they're stored as inches. To convert them to cm I'm doing:
x ($cartoon['art_height'] * 2.54); ?> cm
How can I limit the result of that math to one decimal place, ie, 9.5
cm, not 9.523 cm?
Thanks in advance,
JJ
-
thing like
this.. using arrays for the check box values
if($permissions_data <> NULL)
{
if(in_array($row_rsPermissions['permission_short_name'], $permissions_data))
{ $checked_per = " checked"; } else { $checked_per = ""; }
}
hope that helps you out
Joe
On 6/1
Sorry,
The last post I made was fairly incomprehensible.
I'm trying to
a) edit information which is already in an intersection table, while
b) allowing the user to add new information to the intersection table
The information in it is pulled from the table media_art and I grab the
media_art_id
Nadim Attari wrote:
http://www.php-help.net/sources-php/image.upload.function.353.html
Thanks, Nadim,
I'm sure that is a great script. I am really trying to learn how it's
working, so I'm trying to stay away from pre-rolled stuff as much as I
can and beg for the mercy of the list in buildin
hi,
I'm severely frustrated and perhaps you can help with what I have done
wrong. The checkboxes I use to populate an intersection table work to
add the records, and now I am trying to update them. It's almost there
but producing some unexpected results when the form is submitted: the
idea is
Name6 NULL
You could then test the output of art_id:
$checkbox_media[] = "value='{$media_rows['media_id']}'
".(rows['art_id']==$cartoon['art_id']?"
checked":"")."/>{$media_rows['media_name
Yes, Jason,
Those did it!
Thanks so much for the help!
Jason Wong wrote:
On Thursday 16 June 2005 00:38, Jack Jackson wrote:
//try to get image size; this returns false if this is not an actual
image file.
$image_test = getimagesize($local_file);
if ($image_test !== false
Richard Davey wrote:
Hello Jack,
Wednesday, June 15, 2005, 5:38:11 PM, you wrote:
JJ> newfile returns: 0fdae2e9e6aa43f067a9dd780a5a36a6.jpg
JJ> image_file returns:
JJ> images/jpg/test/0fdae2e9e6aa43f067a9dd780a5a36a6.jpg
JJ> images/jpg/test is set to 777 but I still get (Could not move file
Okay, I started seeing some of my mistakes.
I am still having a great deal of trouble:
newfile returns: 0fdae2e9e6aa43f067a9dd780a5a36a6.jpg
image_file returns: images/jpg/test/0fdae2e9e6aa43f067a9dd780a5a36a6.jpg
images/jpg/test is set to 777 but I still get (Could not move file to
destinati
Hi, After a disastrous first attempt (which uploaded images but only by
chance) it was suggested I rework the entire thing. This one seems to
check the file against getimagesize and if that doesn't prove false,
check the type and make the extension then rename the file. But the
moving part is n
Jochem Maas wrote:
jack jackson wrote:
Hello,
Recently with the help of several of you I got a script working. It's
complex, I'm still new, some parts of it came from other authors and I
adapted it, and generally despite the fact that it seems to work
perfectly at this point, I am ce
Hi,
With your help I got some checkboxes generated the other day for a form.
I would like some help getting a similar problem solved.
I am now making a form to edit db entries made in the previous form. I
have three tables involved: art, media and media_art. I need to show
checkboxes for all
Thanks, Chris, I see what you're getting at. I'm not sure I
understand what you mean about looping through the array in the area
you specified- isn't that just the definitions of the vars? Or is that
what you meant and I'm missing the point!!?
On 6/13/05, Chris Ramsay <[EMAIL PROTECTED]> wrote:
Hello,
Recently with the help of several of you I got a script working. It's
complex, I'm still new, some parts of it came from other authors and I
adapted it, and generally despite the fact that it seems to work
perfectly at this point, I am certain that there is bloat, repetition
and simply usele
Whoops. I must be botching this syntax because this is printing
",,0,," as the query:
All the first part of the query works and inserts records into the
database, and it's when I try to get mysql_insert_id () that I seem to
run into trouble. Ah. ave I not yet run the first query? The part of
th
Thank you Sebastian! Saved me some hell there!!
On 6/9/05, Sebastian <[EMAIL PROTECTED]> wrote:
> Don't forget to mention that even if you don't select a checkbox it will
> still add a empty record to the db.. i know for sure the foreach loop
> will add a record even if a box is not check, so you
HI I have a form which pulls values from the db, and thanks to help
from the irc chat, hopefully makes any checkboxes which are selected
part of an array to be gotten in post:
while ($media_rows = mysql_fetch_assoc($media_result)){
$checkbox_media[] = "{$media_ro
Thanks for this Richard!
On 6/9/05, Richard Davey <[EMAIL PROTECTED]> wrote:
> Hello jack,
>
> Friday, June 10, 2005, 12:05:35 AM, you wrote:
>
> jj> I am trying to make one form on a single page insert info into three
> jj> tables; query 1 creates an art_id (auto-increment) for the newly
> jj>
tt!
>
>
> Matt Babineau
> Criticalcode
> w: http://www.criticalcode.com
> p: 858.733.0160
> e: [EMAIL PROTECTED]
>
> -Original Message-
> From: jack jackson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 09, 2005 4:06 PM
> To: php-general@lists.ph
Hi,
I am trying to make one form on a single page insert info into three
tables; query 1 creates an art_id (auto-increment) for the newly
created row in table art;
query2 creates a media_id in table media.
Then I need to get the art_id and media_id created by the first two
queries to insert int
Matt Babineau wrote:
>Hi all -
>
>I've got a great html invoice that prints like crap because of my user of
>background images and foreground images. Does anyone have any good
>suggestions other than turn on images in IE to get this thing to print the
>graphics? Is there a good way I could convert
Matt Babineau wrote:
>Hi all -
>
>I've got a great html invoice that prints like crap because of my user of
>background images and foreground images. Does anyone have any good
>suggestions other than turn on images in IE to get this thing to print the
>graphics? Is there a good way I could convert
Brent Baisley wrote:
You're close, but you need to group your data on the series_id first.
You can do that by looping through your array and creating another array
using series_id as the array key. You'll end up with a list of arrays
named after the series_id.
foreach( $result_set as $resul
Hi all,
I'm trying to fetch similar things - in this case, rows which share a
series ID no - and bring them into an array and display them grouped by
what makes them similar (in this case, series id). I looked at implode
and explode which seem wrong for this - the only separator I can see is
Clive Zagno wrote:
what php GUI editors do you recommend. Ive used bluefish before, any
other recommendations, thanks
clive
I love Jedit http://www.jedit.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
l the help everyone has offered up to now and hope I
did not offend - I was trying in my last post to indicate that I was
an idiot, and it appears I've come off as arrogant. I promise it was not
my intent!
Jochem Maas wrote:
Jack Jackson wrote:
M. Sokolewicz wrote:
Jack Jackson wro
nk to the Sneezy Acres Tribune only to arrive at the next page and
see, "There are no images associated with this publisher."
Jochem Maas wrote:
Jack Jackson wrote:
M. Sokolewicz wrote:
Jack Jackson wrote:
Thanks for all the replies. Jochem, thank you for this code, which
w
avoid having people see a
link to the Sneezy Acres Tribune only to arrive at the next page and
see, "There are no images associated with this publisher."
Jochem Maas wrote:
Jack Jackson wrote:
M. Sokolewicz wrote:
Jack Jackson wrote:
Thanks for all the replies. Jochem, thank
M. Sokolewicz wrote:
Jack Jackson wrote:
Thanks for all the replies. Jochem, thank you for this code, which
will take me all night to understand (though I bet it works). I also
note that SELECT DISTINCT worked here, too
Also as many of you noticed before me, the art_id was in there as a
Maas wrote:
Jack Jackson wrote:
This is something dumb I am doing but:
Trying to pull all names of publishers in db. This sql:
its a mysql question in disguise, maybe...:
SELECT DISTINCT art.art_id,art.publisher_id,publisher.publisher_name
FROM art
LEFT JOIN publisher
ON
This is something dumb I am doing but:
Trying to pull all names of publishers in db. This sql:
SELECT art.art_id,art.publisher_id,publisher.publisher_name,
FROM art
LEFT JOIN publisher
ON publisher.publisher_id=art.publisher_id
pulls (in phpmyadmin) four rows:
artID pubID Publisher_name
p, you should do this for all *ML pages as long
as the thing being printed is not part of the mark-up syntax.
Jack Jackson wrote:>
Rory Browne wrote:
On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote:
Hi, Rory
Rory Browne wrote:
I think you have the idea. The &'s are us
Rory Browne wrote:
On 6/4/05, Jack Jackson <[EMAIL PROTECTED]> wrote:
Hi, Rory
Rory Browne wrote:
I think you have the idea. The &'s are used to seperate the various
variables. If you want to set $p to something like 'Tom & Jerry' then
personally I'd do s
Murray @ PlanetThoughtful wrote:
If I want to make a link to a URL which includes some GETs can I just do:
Depends very much on the document type of your page. Valid XHTML
(transitional, at least), for example, doesn't like single ampersands in links. For XHTML, you need to replace "&"s wi
, urlencode($p)'
title=\"{$sidebar['art_title']}\">src='{$image_dir}{$sidebar['art_thumbnail']}' width='50' height='60'
border='0' alt=\"{$sidebar['art_title']}\" />";
}
?
Thanks in advance
Hi,
If I want to make a link to a URL which includes some GETs can I just do:
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
asinning wrote:
This is my first post to this group. I've been trying to figure this
out on my own, but I keep running into complications, so I've decided
to get some help. Much thanks for any help!
I've been writing php server application for a couple of years, but now
I'm turning my attent
Greg, thank you for all this... See below
Greg Donald wrote:
On 6/2/05, Jack Jackson <[EMAIL PROTECTED]> wrote:
Thanks for the reply, Greg,
I see how that is useful. I am confused as to how I would implement it
here. Please bear with me as I am a newbie and am now perhaps more
confuse
SORRY - one small correction below:
If that were instead an $s then I would do:
I had accidentally put a number 1 in place of the $s in the above
example. Apologies for the extra mail and thanks in advance.
Greg Donald wrote:
On 6/2/05, Jack Jackson <[EMAIL PROTECTED]> wrote:
ht in
front of my face but I cannot see how to adapt it to the task. .
Thanks in advance!!
Greg Donald wrote:
On 6/2/05, Jack Jackson <[EMAIL PROTECTED]> wrote:
I'd love some help with http://hashphp.org/pastebin?pid=3443 if anyone
can...
Basically I want to make it so
Has anyone else noticed significant delays in messages getting posted?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'd love some help with http://hashphp.org/pastebin?pid=3443 if anyone
can...
Basically I want to make it so that, if the get in the url specifies no
query or a query to a nonexistent row, send to vanilla index. If url
specifies c= then set $c=c and use the number to build the mysql query;
s
Hi, all,
This might look like a mysql problem but I assure you it's my botching
the PHP which is the problem!
I'm building a part of a page with info from three tables: art, media
and media_art. Media_art is the intersection table. For every entry in
art there can be one or more entries in me
Hi, dumb config issue.
I'm putting a php_value include_path statement in an .htaccess file
php_value include_path ".:/home/user/public_html/dis/admin/:/home/nick/"
php_value auto_prepend_file /home/user/public_html/dis/admin/wcsconf.php
and getting a 500 Server Error. Apache logs say, ".
Sorry folks. Figured it out: in httpd.conf it wasn't in the first or
second AllowOverride section (which I had set to All and that's why I
was so gobsmacked) BUT it was in the "Control access to UserDir
directories" section.
Thanks everyone!
--
PHP General Mailing List (http://www.php.net/)
T
87 matches
Mail list logo