Jump to content

PaulRyan

Members
  • Posts

    876
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by PaulRyan

  1. This bit: $_FILES['file']['temp_name'] Should infact be: $_FILES['file']['tmp_name']
  2. You really haven't listened to the advice you've been given in the other multiple posts about this exact same code. session_is_registered is deprecated as of PHP 5.3 and has been completely removed as of PHP 5.4. You have been given examples of how to change your code accordingly. To start a session you need to use the following at the top of everypage that uses the session data: <?PHP session_start(); To create a new session variable you use the following: $_SESSION['variable_name_here'] = 'Variable Value Here'; Then any page that has the session_start() as the beginning can access the session variables, such as $_SESSION['variable_name_here'] from above
  3. Try something like this: <?PHP function generate_serial() { //### Possible characters in the serial $characters = array("1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"); //### Create final serial variable $final_serial = ''; //### Loop 12 times to get 12 characters for($i=1; $i<=12; $i++) { //### Add the character to the serial $final_serial .= $characters[array_rand($characters)]; //### After each 4 characters add a hypen, except the last 4 if($i%4 == 0 && $i!=12) { $final_serial .= '-'; } } //### Return the final serial return $final_serial; } $serial = generate_serial(); echo $serial; ?>
  4. You are not putting the PHP tags around the code... Put this at the start: <?PHP And put this at the end ?>
  5. Well I'm glad he isn't a complete pr*ck. Also I'm kind of glad that I didn't get that far with him about the work, I got another e-mail shortly after the incident for some follow up work I did a while ago. I could have spent hours talking and then realise what he told you, $100 would never have covered it. Non-developers don't seem to realise the effort involved in this line of work, I had one client complain that I took so long with a project I did for him, until I told him about the cross-browser checking of the layout and effects he wanted, as well as the testing of everything to make sure it was secure as I could make it. I never once heard a complaint from him for the rest of the time we worked together.
  6. I really don't know what goes through some peoples minds to be honest. Would be a different story if I had acted that way to them, people need to show a little courtesy and politeness. Anyhow, Philip hit the nail on the head
  7. I contacted a potential client, from a post in the PHP Freelancing section of this site (I won't give any names, it'll be obvious in a sec) I had a little talk with him about what he wanted, he sent me a file which was vague and ill explained. Here's the final part of the conversation: Some people...
  8. Use this: echo '<option value="'. $row['klant_id'] .'"> '. $row['naamKlant'] .' </option>'; Instead of this: sprintf('<option value="') . echo $row['klant_id'] . print('">') . echo $row['naamKlant'] . sprintf('</option>');
  9. Can you tell me the exact model of your Ethernet Controller? I know the make is Atheros, I may the the drivers available for you, I've had to install them many times computers I've had to fix up. Edit** Check here: http://www.softpedia.com/get/System/OS-Enhancements/3DP-Net.shtml I've used this software before, and works well for Windows only.
  10. http://www.php.net/manual/en/function.urldecode.php
  11. Look at this line: $message .= '\n <strong>Zip </strong>' .$row["zip"]); Noticed the bracket at the end? Try removing it?
  12. Well spotted maddigger00009, I changed the filename, but forgot to change the links Thanks.
  13. Instead of saying you tried it and it didn't work, how about you post the code you have, so we can see where you went wrong and try to help you? We aren't standing next to you so we cannot see exactly what you see Regards, PaulRyan.
  14. Thanks for the suggestions Rounded Corners - I originally had rounded corners implemented, but felt they just didn't suit the layout, try it yourself, I'm sure you have Firebug installed try adding the rounded corners, it just doesn't quite fit. New Colours - What colours would you suggest? I've never really tried other colours with this, I'm a big fan of the dark layouts, but if you have a new colour scheme to suggest, fire away and I'll try it out Regards, PaulRyan.
  15. Try this out. <?PHP $http = (!empty($_SERVER['HTTPS'])) ? 'https://' : 'http://'; $url = $http.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; $url = pathinfo($url); $url = $url['dirname']; echo $url; ?>
  16. Galactic Space Tactic is space themed RPG. I'm just looking for some general feedback on my sites colour scheme, layout and functionality. This is a personal project of mine that I've been working on gradually over the last 7-8 weeks or so. Link: http://www.paulryanmc.co.uk/gst/index.php Feel free to create an account and comment on the sign-up process and whatnot Regards, PaulRyan.
  17. You're missing the session start function on your admin page. <?php session_start(); if ($_SESSION['admin'] != "true") { header("location: login.php"); } else { ?>
  18. Try this program: http://www.piriform.com/recuva I've used it a few times, although it won't recover 100% of files, it does a pretty good job.
  19. ibnclaudius, the list you've shown us, do you have the code that creates that list? Or is this from a database as a string or scraped from a page? If it's the latter, this will work: <?PHP $string = 'You, Paul, Peter, Chris, like this'; //### Explode the string to an array $people = explode(',', $string); //### Count array length $countPeople = count($people); //### If the are 2 or more name in the array, we use the code below if($countPeople > 2) { //### Merge the last name with the "like this" text $lastName = $people[$countPeople-2].$people[$countPeople-1]; //### Assign the second last name $secondLastName = $people[$countPeople-3]; //### Remove the last 3 elements of the array array_splice($people, $countPeople-3); //### Add the new ending of the list $people[] = $secondLastName.' and '.$lastName; //### Implode the array with commas to make the list again $people = implode(',', $people); //### If there is only 1 name in the array, just remove the comma } else { //### Remove the comma from the string $people = str_replace(',','',$string); } echo $people; ?> If you have the actual code that creates the list, we could probably help you modify it to fix your issue. Regards, PaulRyan.
  20. You can do as you have suggested and the encode the file so it cannot be read? Something like ionCube or Zend Guard. Regards, PaulRyan.
  21. When I first started freelancing, it was from this very forum in the freelancing section. I get up when I want, work when I want and go to sleep when I want. I've earned about £1,300 a month doing freelancing over the last year or so, marketing myself as a sole trader. I also sold my share in a website I built without any upfront pay from the client, it sold for £3,000 and 50% was mine, which I got as soon as the deal was made and the money was in the clients account. (Expected to receive nothing) I've done about 25 different projects from the freelancing section, and became friends with most of my clients. They recommend me to their friends and co-workers and such, so I always seem to have a steady flow of work coming in from those. So it's good to check around forums and such and build a rapport with the clients, as it nearly always leads to more work. Regards, PaulRyan.
  22. You'd probably want to use $_GET like this: <?PHP $name = $_GET['name']; //### Will now be "joe" $size = $_GET['size']; //### Will now be "small" echo 'Name: ' . $name . ' <br>'; echo 'Size: ' . $size; ?> Of course you will have to check to make sure the query paramter exists using isset. Regards, PaulRyan.
  23. You aren't actually display the $quizTitle variable, you need to echo it out. Change this: <?php ".urlencode($quizTitle)."; ?> To this: <?php echo urlencode($quizTitle); ?> Also note the path change: (File 1) 'check.php?quizTitle=<?php '.urlencode($quizTitle).'; ?>' Compared to: (File 2) 'check/check.php?quizTitle=<?php ".urlencode($quizTitle)."; ?>' Regards, PaulRyan.
×
×
  • 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.