How to use pHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dayton

    How to use pHP

    I have never used PHP berfore and my web server provided me with a PHP
    script that I am to use with my form. My question is how do I use it? Do I
    call it in my <FORM ACTION= > tag like I do with a cgi script that I use on
    another site? DO I embeded it in my html live JaveScript? Also does my form
    page need to end with a php entension?

    T.I.A.


  • Geoff Berrow

    #2
    Re: How to use pHP

    I noticed that Message-ID: <pObGd.5622$nt. 4721@fed1read06 > from Dayton
    contained the following:
    [color=blue]
    >I have never used PHP berfore and my web server provided me with a PHP
    >script that I am to use with my form. My question is how do I use it?[/color]

    Ask them for instructions.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • John Dunlop

      #3
      Re: How to use pHP

      Dayton wrote:
      [color=blue]
      > I have never used PHP berfore[/color]

      Then you might find reading this worthwhile:


      [color=blue]
      > and my web server provided me with a PHP script that I am to use with my
      > form. My question is how do I use it? Do I call it in my <FORM ACTION= >
      > tag like I do with a cgi script that I use on another site? DO I embeded
      > it in my html live JaveScript?[/color]

      Depends. Were there any instructions along with the script?
      Do you understand the script? If it handles form data, as
      you implied, then make it the action of your form. Play
      around and see what happens.
      [color=blue]
      > Also does my form page need to end with a php entension?[/color]

      No. On your server, however, PHP might parse only files
      with the '.php' extension. You can tell it to parse other
      files if you like, but that's extra work.
      [color=blue]
      > T.I.A.[/color]

      Don't thank anyone yet.

      HAGW!

      --
      Jock

      Comment

      • Dayton

        #4
        Re: How to use pHP

        Thanks for all your wonderful help. I would have never been able to think of
        that on my own. Answers like this are what makes these message boards so
        invaluable.




        "Geoff Berrow" <bl@ckdog.co.uk > wrote in message
        news:rtjiu0ddm7 35cu2nd8r7cci6i 9is7phufg@4ax.c om...[color=blue]
        >I noticed that Message-ID: <pObGd.5622$nt. 4721@fed1read06 > from Dayton
        > contained the following:
        >[color=green]
        >>I have never used PHP berfore and my web server provided me with a PHP
        >>script that I am to use with my form. My question is how do I use it?[/color]
        >
        > Ask them for instructions.
        >
        > --
        > Geoff Berrow (put thecat out to email)
        > It's only Usenet, no one dies.
        > My opinions, not the committee's, mine.
        > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]


        Comment

        • Geoff Berrow

          #5
          Re: How to use pHP

          I noticed that Message-ID: <wkdGd.5627$nt. 839@fed1read06> from Dayton
          contained the following:
          (Reordered to overcome top posting)[color=blue][color=green][color=darkred]
          >>>I have never used PHP berfore and my web server provided me with a PHP
          >>>script that I am to use with my form. My question is how do I use it?[/color]
          >>
          >> Ask them for instructions.[/color][/color]
          [color=blue]
          >Thanks for all your wonderful help. I would have never been able to think of
          >that on my own. Answers like this are what makes these message boards so
          >invaluable.[/color]

          It's always a pleasure. :-)

          Ask a clueless question, expect a clueless answer. How the hell are we
          supposed to know how /your/ script works unless we see it? Sure we can
          guess, but so can you. To get help here it pays to show that you at
          least tried. And that means doing the obvious first.



          --
          Geoff Berrow (put thecat out to email)
          It's only Usenet, no one dies.
          My opinions, not the committee's, mine.
          Simple RFDs http://www.ckdog.co.uk/rfdmaker/

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            [OT] Re: How to use pHP

            Geoff Berrow wrote:
            <snip>[color=blue]
            > Ask a clueless question, expect a clueless answer.[/color]

            "Ask a clueless question and expect a spoonfeeding" is the curse of
            c.l.php :-(

            --
            <?php echo 'Just another PHP saint'; ?>
            Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

            Comment

            • David

              #7
              Re: How to use pHP

              i'm shocked at how unkind people can be when replying to posts for help


              simply put a
              <?
              ?>
              around your php code

              e.g.
              <?
              echo 'hello world;
              ?>

              I think you can put it pretty much anywhere in your html because being
              server side, the server evaluates it first before sending to the client
              To use an existing php script, you probably want to just do
              index.php (yes, make it end with php)
              ----------

              <? include 'vars.php'; ?>
              ....other normal html stuff...
              ....

              hope that helps,
              Loki


              "Dayton" <dayton500@NOSP AMhotmail.com> wrote in message
              news:pObGd.5622 $nt.4721@fed1re ad06...[color=blue]
              > I have never used PHP berfore and my web server provided me with a PHP
              > script that I am to use with my form. My question is how do I use it? Do[/color]
              I[color=blue]
              > call it in my <FORM ACTION= > tag like I do with a cgi script that I use[/color]
              on[color=blue]
              > another site? DO I embeded it in my html live JaveScript? Also does my[/color]
              form[color=blue]
              > page need to end with a php entension?
              >
              > T.I.A.
              >
              >[/color]


              Comment

              • Hartmut Holzgraefe

                #8
                Re: How to use pHP

                David wrote:[color=blue]
                > i'm shocked at how unkind people can be when replying to posts for help
                >
                >
                > simply put a
                > <?
                > ?>
                > around your php code[/color]

                *please* use <?php ... ?> not just <? ... ?>

                <? ... ?> is not valid XML (and so not valid XHTML, too)
                and can be switched of using the short_tags php.ini directive

                Note that every XML and XHTML file starts with

                <?xml version="1.0" ?>

                With short_tags on this would be interpreted by PHP and
                you would get a

                PHP Parse error: parse error, unexpected T_STRING in - on line 1

                error message

                --
                Hartmut Holzgraefe, Senior Support Engineer .
                MySQL AB, www.mysql.com

                Are you MySQL certified? www.mysql.com/certification

                Comment

                Working...