for example in the formA.php

####formA.php#########
<form name=form1 action=formA.php method=post>
<input type=text name=var value="" />
<input type='submit' name='submit' value='submit' />
</form>
###################

i want to build a php file named B.php
once i visit B.php , it will complete the form ( from formA.php) automatically( for example make var='hello').
i know one way that is to use javascript like this :
document.all.form1.submit();

but i know there are some php function can help me complete the form (and send it) on the sever side?

btw. my teacher said the book PHP AND MYSQL WEB DEVELOPMENT is good, and i'm reading it, but i don't think is good, i even can't finish my homework with this book.
so which php book do you think is good?

    There's a whole extension for embedding an http client into PHP; look up [man]cURL[/man].

      perfume:

      PHP AND MYSQL WEB DEVELOPMENT is a great book for learning PHP and MYSQL.

      However, from looking at your code it doesn't appear that you have read the book very carefully and/or worked through the examples in the book.

      To start with your code:

      <form name=form1 action=formA.php method=post>
      isn't correct.

      It should be:

      <form action="formA.php" method= "post">

      PHP code doesn't make forms. PHP code allows you to take information you enter into a form and do something with that information.

      You create your actual form using HTML.

      Did you work through the examples in the book for Bob's Auto Parts and Book-O-Rama?

      I don't mean did you copy the code from the CD and then run it.

      You need to sit down and actually write/input the code yourself. You will make some errors and then when you try and run the code you will get some kind of error message. Then you have to figure out where your error is and fix it.

      If you want to learn how to write code in PHP or any other computer language, you have to actually write the code. The more code you write, the more you learn. There just isn't any easy way around it.

      You won't get very far learning how to program in any language if you just copy sample scripts from Web sites and use them.

      I don't know if this has helped you any or not, but I think if you really work through the book and actually do the projects you will be surprised at how much you will actually learn.

      Anyway, I wish you the best of luck.

        Weedpacket wrote:

        There's a whole extension for embedding an http client into PHP; look up [man]cURL[/man].

        thank you .i think it can help me a lot. i'm trying using it. but does php has similar functions without any extension?

        To AIS4U
        thank you for your advice, i quite agree with you. my teacher recommend it as a good book for self-study, but sometime i can't find any solution for my homework from the book or my own training book. so i hoping get a good book which teach more functions. thank you again

          does php has simular functions without any extension?

          Besides the basic language syntax and a few other bits and pieces, php is made up of extensions. Without them, the language itself would be pretty sparse and not very functional.

            perfume wrote:

            but does php has similar functions without any extension?

            [man]fsockopen[/man] but you've got to do the http protocol yourself (that's why there's an extension).

              Write a Reply...