Jump to content

haku

Staff Alumni
  • Posts

    6,172
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by haku

  1. You are trying to echo inside an echo. That won't work. You need to do it like this: $name = 'haku'; echo 'My name is ' . $name . ', and this is a string';
  2. That's because you are echoing the PHP tags. You are already in PHP, you don't need php tags.
  3. The submitted values are an array. You have saved the array directly to the database, but databases (or at least MySQL, can't speak for others) can't store PHP arrays, they can only store strings. So you are going to have to parse that array, and turn it into a string. You can use serialize() if you want. But then the indivudual values will not be searchable, which isn't the best database practice.
  4. Sorry, but you haven't given us enough information to be able to help you any more than we already have. You are on your own. Good luck.
  5. You have to parse the submitted data before saving it to the database.
  6. My putting it in your script isn't going to do anything. I don't know what your script is supposed to do, and I don't know what you are trying to do. Why don't you tell us what you mean by 'it's not working'.
  7. $rand['utilizator'] = 'something';
  8. Wherever you want. Just make sure it's after session_start(), and that $rand['utilizator'] is set before this point.
  9. As a side note, I'm disappointed to see that they are teaching this style of javascripting in your class - the JavaScript you are using is quite outdated. After you've finished your course, I'd suggest buying an up-to-date book on JS and learning how to do it properly. What you have will work, but it's not how things are done anymore. But since I don't want to confuse you, I'll leave you with what you've got. I just wanted to give a pointer for the future.
  10. You have your math incorrect then. This: var bioEnergy = (userMsDays * PI / 33)/2; Should be this: var bioEnergy = (userMsDays * PI * 2) / 33; (according to your description)
  11. echo '<a href="http://iplocation.truevue.org/' . $row['ip_address'] . '">' . $row['ip_address'] . '</a>';
  12. The error is telling yout that this doesn't exist: $_FILES['fileUploads'] $_FILES is only set after a form has been posted (with a file attached to it). So when you visit this page before submitting the form, you will see the error you are seeing. You can fix it like this: if(isset($_FILES, $_FILES['fileUploads']['tmp_name'])) { $im = imagecreatefrompng($_FILES['fileUploads']['tmp_name']); imagepng($im, $_FILES['fileUploads']['name'], 9); }
  13. I didn't say there were more errors, I said there was more to the error. You should always paste the full error, as we cannot guess what the error is. The error you are showing us says this: Undefined index: fileUploads However the code you showed us is not using the index fileUploads (it is using fileUpload). So the code you showed us is not the code that is causing the error.
  14. I'm pretty sure that there is more to the error than just "Unidentified index".
  15. You cannot hide image paths. The browser needs to know the path to show the image, and once the browser has it, it's there for the user to see. However, you can set up a system to serve your images from a php script, and then add security checks to that php script. So if the user has permission to see the image, the script will serve the image to the user, or if they don't have permissions, it will block them. The user can still see the image path (which is actually a path to a php script), but since the security check will happen if they try to access that path, it solves your problem. Here is someting to get you started: http://www.thewebsqueeze.com/web-design-tutorials/how-to-output-images-using-php.html
  16. Of course attempting new things is important. But it's like a weekend hiker deciding to climb Everest. There are probably better targets to go after first.
  17. First you get out your keyboard. Then type the following: index.php?tab=AdminCatalog&token=0126f77dbc39a85996398fb69bf3699841 Hopefully that helps.
  18. $data = mysql_query ("SELECT * FROM `my_data` WHERE `value` LIKE CONVERT(_utf8 '%$name%' USING latin1) COLLATE latin1_swedish_ci");
  19. $result=mysql_query($query) OR die(mysql_error());Need to figure out what your problem is. But I do see you've added some parenthesis in your query, that were not part of the example I gave. Could be that.
  20. If you are an intermediate programmer, and are not even sure of the logic, this is likely way beyond your skillset. You will need to find a payment gateway that allows for user to user payments, then integrate the back-end of your system with their API. The specifics will be dependent upon the payment gateway you need. As each payment gateway API will be different, we really cannot give you any help here, since you haven't even got a payment gateway to work with yet.
  21. END ASC ...as can be seen in my original example.
×
×
  • 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.