Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Having encoded code also puts a larger load on the server as it has to be decoded every time its run, which is not really good IMO. Who cares if your client messes the code up...then they have to pay you to fix it as it was their fault, not yours. Easy money.
  2. Its really hard to tell what you did with invisible code (you didn't post any). Anyway, Im off for the night. -Did you include mootools -Did you include the plugin -Did you include all of the css -Do you have code to post that shows what you are doing.... Its really hard to guess at this stuff....
  3. If you are trying to find out how old they were in 1992, I suppose you would: <?php $howOldTheyWereIn1992 = $age - (date('Y') - 1992); ?> BUT that will make them a negative age if they are younger than 16 (using 2008 for current year) since they weren't born yet.
  4. Did you look at his examples? http://digitarald.de/project/fancyupload/2-0/showcase/photoqueue/ Look at this part: $('demo-browse-images').addEvent('click', function() { swiffy.browse({'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'}); return false; }); So you would change to: swiffy.browse({'Acrobat PDF (*.pdf)': '*.pdf'}); but using the name of your instantiated class, etc. The first part 'Acrobat PDF (*.pdf)' is what is shown in the files dialog box and the last '*.pdf' is the actual filter to use that will only list pdf files to select to upload. Hope that helps
  5. Well, its very easy and Harold always extensively documents his code. Its in the very beginning fancyupload.js in the options.
  6. Im sorry, I really don't understand what you are trying to do exactly. You want to figure out their birth year by how old they are, but use 1992? Use 1992 for what and why?
  7. I dont think you can accurately determine the birth year based on age and current year. You don't know if they have had their birthday yet for this year. Instead of asking their age, why not ask the birth date and get the age from that?
  8. If your main content is in a div with an ID of 'pnlMain' you would use something like this css. #pnlMain { background-image: url('images/mybackground.png'); background-repeat: no-repeat; background-attachment:fixed; }
  9. arrays start with 0 though, so it should be $item=0 in your for loop or you will miss the first entry.
  10. <?php class PDF extends FPDF { public $header; public function Header() { //Title $this->Cell(60,10,$this->header,0,1,'C'); } public function setHeader($header) { $this->header = $header; } } ?> Then: <?php $header = "This is from my SQL"; $pdf = new PDF('P','mm','Letter'); $pdf->setHeader($header); ?> //... It should work as its from some work that I have done before, but I stripped a lot out for simplicity.
  11. Couldn't you just make the files read only so they couldn't modify them?
  12. http://www.w3.org/TR/html401/interact/forms.html#h-17.11
  13. You can use javascript as well for adjusting properties
  14. Aint it great when php has a command to do this for you? http://us.php.net/json_encode
  15. maybe its the permissions set on those directories?
  16. Try as Maq suggested. I would rewrite it like so: $query=" INSERT INTO affiliates (Company , Contact , domain , email , Tel , Fax , Cell , Address , Postal , Referrer , Confirm , Type , ref2 , ref3 , ref4 , aff_id) VALUES ( '$company', '$fname', '$domain', '$email', '$tel', '$fax', '$cell', '$address', '$postal', '$userid', '0', '$type', '$aff', '$aff1', '$aff2', '$aff3', 'affid')"; echo $query; mysql_query($query); That will list your exact query so you can check for errors
  17. You are using the full path, so it needs the / in front of /var/.... Although I would use the relative path as it is much more portable if you switch servers, you wouldn't have to update your code. Say your structure looks like this: /httpdocs (root of your webspace) /images /images/uploads if your script is being run from /httpdocs then use 'images/uploads' for your relative url.
  18. CroNiX

    input as image

    you can use a javascript onClick event for the input image and tell that to submit the form.
  19. It looks like you are using mootools. Here is the info for 'fireEvent': http://mootools.net/docs/Element/Element.Event#Element:fireEvent
  20. Just out of curiosity, do you really need to do this 'realtime'? If you have 10 people on your site you will have a lot of requests to your server putting additional load on it. If you have 100....1000.... What if they leave their computer and the browser is just sitting on your page? Thats a lot of unneeded/unwanted requests to the server. I would just update it on every page refresh personally.
  21. possibly rawurlencode() / rawurldecode()
  22. It looks like your image path. If you start the path with a / then it is going to the root directory of the host, not the root dir of your webspace. Either user a relative url (like images/uploaded with no / in front) or use the full path (/var/www/vhosts/sppa.org.sg/subdomains/istaff/httpdocs/images/uploaded) or whatever it is.
  23. Viewing sensitive data and posting it are the same thing as far as needed encryption. Anytime sensitive data is going either to or from the server it should be encrypted as the packet can be sniffed either way.
  24. javascript... its not serverside, but you can pass it to a php variable and use it that way.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.