#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    41
    Rep Power
    15
    How would one go about enclosing the certain elements of a page (specifying them as variables maybe) and sending them to a specific PHP script (if can be done by a PHP script) so when the viewer clicks on the link "printer friendly version" or something of a specific page it sends that data to a PHP file (e.g. printpage.php3) and forms it into text only printable content? Also, how would I go about creating the code for the "printpage.php3" or whatever? Your help will be greatly appreciated.

    -Colin Anderson
    >=^) http://www.htmletc.net/
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Now this would be really easy if you where using a database. But I guess your not. If you would put all the elements into variables and assign them to a link, the URL would be miles long. If I were you I'd save myself some trouble and time and use a database. Then you would assign an ID to each article or whatever, pass that along in the link, then printpage.php would get the data from the DB and format it. If you need more help, feel free to e-mail me, h@NO.SPAM.THANKS.isl.is.



    ------------------
    Regards,
    Hreinn Beck
    Director of R&D
    Network Solutions - Iceland
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Roseburg, OR, USA
    Posts
    23
    Rep Power
    0
    I think you could also do this with Javascript. Perhaps have it open a new window with text only that it gets from a certain ID'ed tag in its parent document... perhaps through innerHTML for IE (not sure what the equivalent is on Netscape).

    good luck : )
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I don't know much about php but I think php have a get() or something like it to retrieve files from other website and maybe you can send it to the like this: http://www.domain.com/printpage.php?....com/page.html

Similar Threads

  1. How to see the Memory used by a PHP script?
    By Pardall in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 04:54 PM
  2. page breaks on printer friendly pages
    By cubanallstar83 in forum HTML Programming
    Replies: 3
    Last Post: February 13th, 2004, 07:32 AM
  3. Replies: 0
    Last Post: February 8th, 2004, 11:11 PM
  4. Sending a file to the printer
    By please_explain in forum PHP Development
    Replies: 3
    Last Post: February 8th, 2004, 12:56 AM
  5. Multiple choice, multiple page forms
    By Iswd1 in forum PHP Development
    Replies: 1
    Last Post: February 3rd, 2004, 05:43 PM

IMN logo majestic logo threadwatch logo seochat tools logo