Thread: how do i turn this into a variable?

  1. #1
    Registered User
    Join Date
    Jun 2011

    how do i turn this into a variable?

    when i upload files they are saved with a temp_name in unix time format. My variable $newname="images/".$image_name; lets me display the picture by echoing $newname on the same page but how can I echo this image on different pages? I am unable to do it through sessions. If there is no way to echo it on different pages, how can I display the last file uploaded to my directory in a session?

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    segmentation fault
    This looks like perl or PHP, not C++.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Moved to tech, until the OP can clarify what it is they're trying to do.

    Reading this might help them formulate a half-decent post.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can't turn on my pc
    By Niara in forum Tech Board
    Replies: 25
    Last Post: 10-27-2009, 06:29 AM
  2. Turn Off Optimization?
    By danlee58 in forum C Programming
    Replies: 6
    Last Post: 12-10-2008, 03:52 AM
  3. Where to turn to?
    By XMX in forum C Programming
    Replies: 3
    Last Post: 07-11-2008, 06:26 PM
  4. when I turn my pc on...
    By Unregistered in forum A Brief History of
    Replies: 10
    Last Post: 03-22-2002, 03:14 PM