Re: [PHP] echo "" problem NEW

2002-01-08 Thread Steven Cayford

On 2002.01.09 02:00:55 -0600 universal2001 wrote:

> so I tired to use (echo) like this:
> 
> echo "
>   
>  border="0">
>   
>   
>  src="img_heading/index_r1_c1.gif" width="639" height="5" border="0">
>  border="0">
>   
>   
>  src="img_heading/index_r2_c1.gif" width="25" height="43" border="0">

Try to think like a computer program. It sees the command:
echo "";

Or you could drop out of php mode entirely to do your html like this:







One of these methods should get you going.

-Steve

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Splitting List - newbie & advanced

2002-01-18 Thread Steven Cayford

Right. Lets not split the list. I already follow too many lists, if this 
was split I would feel I needed to follow both.

On 2002.01.18 20:05:48 -0600 Miles Thompson wrote:
> If anyone wants to pursue this, here's the thread.
> 
> I do not believe the list should be split, although there is a mix of 
> new and advanced questions.  Although the some of these are best 
> answered by an RTFM and a reference to a tutorial, the newcomer benefits 
> by exposure to advanced concepts and topics.
> 
> The list receives posts related to database and installation questions, 
> although there are lists for those.
> 
> There is a relatively high level of cross-posting between the general 
> and db lists. If general was split into newcomer and advanced, I believe 
> cross posting would increase.
> 
> Newcomers do need help; who will read and support them on the newcomers 
> list? Traffic will tend to migrate to the advanced list.
> 
> Many of these questions argue for a FAQ, yet we have a lot of rich and 
> informative tutorial resources, and an excellent, on-line, annotated 
> manual. One suggestion I would have in this regard would be to feature 
> "Tutorials" link much more prominently on the php index page.
> 
> My premise for that last sentence was the relatively small "Links" tag 
> on the top right hand of that page. Thinking that maybe I should look 
> again, just to be sure, what did I find?
> 
> 1. Under the "What IS PHP?" heading, a link to a rudimentary tutorial 6 
> lines down in the opening paragraph.
> 2. Links to the manual and to the links page within the same paragraph.
> 3. At the end of the introductory tutorial a link to the links page.
> 4. Within the links page, links to other tutorials, script resources, 
> PHP information in other languages, etc.
> 
> *WOW*, what a rich resource, all free, with information of incredible 
> depth! How many other languages, have such a library of references and 
> tips to hand? All this for a language which was announced to the world 
> on June 8, 1995?
> 
> Conclusions?
> 
> 1. Don't split the list.
> 2. Maybe change RTFM to WEHAVAGEM (WE HAVe A Grand Extensive Manual), 
> did you read the bit on ...?

How about PTRM (Peruse The Remarkable Manuscript)? 
> 3. Keep a list of tutorials to hand on: Databases and Normalization, SQL 
> Queries, Basic PHP techniques.
> 4. I believe Rasmus Lerdorf should be nominated for the Order of Canada.
> 
> It's the end of the week. Let's not wrangle too much over this, but 
> enjoy the weekend.
> 
> Regards - Miles
> 
> 
>-- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Ensuring that Form is only submitted once (session vars?)

2001-12-21 Thread Steven Cayford

Your first reference to a session (usually session_start()) must come 
before any html is sent to the browser. A common problem is to have some 
white space before the  tag in a preceding file.

You can set up something like what you're working on using session 
variables. Create random numbers and stick them in each form as a hidden 
input with the name formId or something. Then register an array of used 
formId's as a session variable. At the top of each script check if there's 
a formId and if so see if it's in the used ids array. If so you can chuck 
out the form input, if not, the form's ok, but add the new formId to the 
used ids array.  
This should at least keep someone from re-submitting a form in the same 
session.

-Steve

On 2001.12.22 00:09:30 -0600 Andrew V. Romero wrote:
> I was wondering if there is a way to ensure that a form is only
> submitted once.  I have a script that saves a lot of information to the
> disk and if the user uses the back button and then resubmits the form,
> it will cause major problems.  I jave looked into using javascript to
> fix this, but it doesn't seem like there is an easy way using
> javascript.  In the process of looking into this, someone recommended
> using a session variable.  I have never used sesion variables, but tried
> a sample code in the documentation:
>  session_register ("count");
> $count++;
> ?>
> Hello visitor, you have seen this page  times.
>  # the  is necessary to preserve the session id
> # in the case that the user has disabled cookies
> ?>
> To continue, click here
> 
> but I get an error saying "Warning: Cannot send session cookie - headers
> already sent by (output started at
> c:\server\apache\htdocs\session.phtml:5)"  and "Warning: Cannot send
> session cache limiter - headers already sent (output started at
> c:\server\apache\htdocs\session.phtml:5) in
> c:\server\apache\htdocs\session.phtml".
> 
> So two questions, first is a sesssion variable the way to go in ensuring
> that the user doesn't use the back button to resubmit a form, and
> secondly why am I getting this errors when I just cut and paste the
> example code into a sample page?
> 
> Thanks for any direction and help,
> Andrew V. Romero
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]