Results 1 to 9 of 9

Thread: How do I place this script on PHP page

  1. #1
    Join Date
    Oct 2005
    Posts
    63
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default How do I place this script on PHP page

    1) Script Title: Drop in box

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici.../dropinbox.htm

    3) Describe problem: How can this script be placed on PHP page?

  2. #2
    Join Date
    Jun 2007
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    since the script tells ya to add this code at the very end of your page,
    i suggest u search for the php ending tag..

    Code:
    ?>
    just add the code after this line.. should work...

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The placement has nothing to do with the PHP itself, but the output html. Just figure out how to put it into the output html (in the browser, view the source code).
    Then, once you know what part of the html must be edited, find the part of the PHP that generates that. Hopefully, it's just plain html outside PHP tags. If not, it's still possible.

    Again, PHP isn't the issue. The difference is just that PHP generates the final html, rather than typing it by hand.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Oct 2005
    Posts
    63
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default JS on PHP

    placed the script at the beginning of the page and

    the body containing the <div at the end of the php code.

    some warning errors:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ....user_register.php:1) in ....../class_sessions.php on line 16


    Warning: Cannot modify header information - headers already sent by (output started at /.....user_register.php:1) in ......user_register.php on line 104

    Difficulty in trying to decipher.

    thanks

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by dbldee View Post
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ....user_register.php:1) in ....../class_sessions.php on line 16
    This is in the PHP FAQ. Please read it and the manual entries linked from it.
    Mike

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Header information, such as with sending a cookie, starting a session, or anything like that, must be sent before any text output, so that explains your error. The script will need to be placed after those lines in the PHP, then.

    Remember, having a script floating after or before <html> or </html> is invalid anyay, so you'll need to, as I said, find where it should go in the output, then find the line(s) that generate that portion, and add the code that way.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Oct 2005
    Posts
    63
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default JS on PHP

    Code has been placed but error message indicating unexpected opening tag

    the page

    the line 450 is the opening div and cannot be removed.

    Assistance very much appreciated.

    the html page works fine
    Last edited by dbldee; 08-02-2007 at 01:46 PM. Reason: true link edit

  8. #8
    Join Date
    Oct 2005
    Posts
    63
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default JS on PHP

    I have tried to add

    $html=file_get_contents('user register.html');
    with the Java Script being included in the html file.

    link.

    it appears that the syantax may still be incorrect.

    Assistance appreciated

    371 $html=file_get_contents('user register.html');';
    372 include(PMDROOT.'/includes/template_setup.php');
    373 ?>
    Last edited by dbldee; 07-26-2007 at 05:35 PM. Reason: include code

  9. #9
    Join Date
    Oct 2005
    Posts
    63
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default

    the script now loads on the page but with some warnings

    http://www.eConsumersearch.com/membe..._registest.php

    line no 8 of the html
    <script language="JavaScript1.2">

    How/why would this line be sending headers, if the html is sent before sessions start?

    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •