Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Avereaged from that site, 90 WPM from 3 seperate tests. Been a while since I actually type with punctions where you had to get it right to proceed, caught me off guard the first time. Fun little deal though
  2. What anti-virus even really works anyways? All it takes is one stupid click with IE and viola. It is all trashed anyways (given the zero day exploits). You are better off just not downloading or running anything on your computer.
  3. No, it makes a nice paper-weight...why would you want to ruin that functionality?
  4. header("Locations: login.php"); It should be Location and not Locations. header("Location: login.php");
  5. Well you have a couple different methods and items to think about. First up, do you want it to be "current" as exchange rates constantly change. If so you will need to fetch that data with cURL daily (cron script) and update your DB with the rates. An array would be fine, if done properly. But better to have a DB backend, and just input into the db each exchange rate from a to b and back. So one setup for the DB could be: exchange_rates type to rate_to rate_from Type would be say USD or GBP to would be what you want to convert it to, so GBP or USD, etc. then the rate_to is the rate to from USD to GBP and from is to go from GBP to USD. Again this may not be the best, but is one way. Hope that gets you started
  6. What error messages are you getting? What is happening? Without providing more details it is impossible to tell. Some items to check is the php.ini and the max post size / memory limit / upload file size on your local host where it works and make it the same on the server.
  7. Header is better since it is done on the server. The user cannot disable this or turn it off (well they can disable redirects all together, but usually headers are allowed). Meta redirects people tend to turn off / block just because of their XSS nature, which can redirect to exploit codes to be infected. So yea, doing it on the server level, it is "more secure" from the end users point of view and it is harder from them to "disable", which most do not disable this feature.
  8. Maybe the new leaders will oblige, but doubtful. But why does it matter, it is just an Alias anyways, who really cares other then you?
  9. Where is the firstname / email defined? The changes I mentioned should not have broke the rest of the script at all.
  10. Your variable replacing bit is a bit messed up. View the source, make sure the link is properly formed with matching double quotes etc (the a href). Also check where it does the replacement and make sure that is getting formed correctly. That is the best advice I can give with the information provided.
  11. $email_msg = 'Email : ' . $Email; $email_msg .= "\n" .'First Name : ' . $FirstName; $email_msg .= "\n" . 'Last Name : ' . $LastName; ' take the \n character literally. You need to encase it in double quotes.
  12. It seems like you are used to working with PHP and register_globals being turned on. This has been off by default in PHP 4.x versions + due to the security vulnerabilities it creates. Try something like this and see if it works: <?php // load config file include("dbconfig.php"); $newsid = isset($_GET['newsid'])?(int) $_GET['newsid']:0; $result = mysql_query("SELECT * FROM news WHERE newsid='$newsid' ",$connect); while($myrow = mysql_fetch_assoc($result)) Basically it checks if newsid was passed in. If it was it converts it to an INT to avoid a possible sql injection. If not it passes 0, you can do error checks etc here if you would like, but should give you a basic structure. The ? : are the ternary operator which acts as a shortened else / if incase you were wondering.
  13. ffmpeg is a good place to start.
  14. It is not stripping out the returns. On displaying the data from the database use nl2br and it will convert the returns to linebreaks. The reason for this is HTML does not display linebreaks, you have to use the html tag <br /> to get a line break to display, which nl2br does. Do not save it in your database with the <br /> tag. It is better to have data in it's raw form.
  15. What seems to be happening is MultiViews is in the virtual hosts <directory> definition. This will attempt to find the file as .html first so it automatically redirects it to .html. This does cause issues have you have just noticed, with re-writing of some URLs. I am not 100% positive that is what is happening, but you can try and turn off the MultiViews in the .htaccess (I never tried it before) or add it to search for .php first and then you would not need the custom rewrite rules. I am not 100% sure on how to do this, but viewing the link Cags posted should lead you to some good information. Googling "MultiViews htaccess" may also yield some good results.
  16. <? is used when short tags are turned on in the php.ini. It is not wise to use them as they can be turned off. That is why you should generally always use <?php and type the extra 3 characters. As doing that you ensure that your script will work (at least tag wise) on any system running php and you will not have to make mundane updates to it, or have issues when upgrading to a new system or switching hosts etc.
  17. The & is generally used for passing as reference, but afaik, it needs to be in the funciton declaration. Not the function call. It works either way. So it is just being passed by reference (meaning that variable will contain whatever the end result was inside the function or a reference to it anyhow)
  18. Yes, that will download the entire page. To just get the page headers you can use this: With the curl_setopt to just get the headers.
  19. The code you posted is not showing any syntax errors. Is that the full code, or did you omit some items?
  20. Looks like it may be time for a password change. You can only modify a post within 10 or 15 minutes of posting (cannot remember which).
  21. Well, sometimes I feel like a female. Does that count?
  22. Please describe any errors you are getting or "how" it is not working. Thanks.
  23. Post where / how you are using the above items, IE the html tags.
  24. So if the use of "place" holders is bad, how do you display the translation coming from the database? The only bad part about it, is you are under the assumption that if he incroperates a language and forgets to fill out all the language translations of the item added, which, of course would display the empty translation, IF, and only if, you were a moron and did not code for this. It should be entered into the DB as a "no translation error". You are also under the assumption that by placeholder I meant a CONSTANT, which of course I did not specify. I was more under the lines of getTranslation('field-name') which could handle this "mishap" elegantly, in that if the fetched translation is empty or not specified it gives a default message or something similar. As far as from the file to the database, I would agree that the database would be the favored result, but files work just as well. They just require an effort to make changes by editing / uploading the file, where as the database you can create the interface to add / modify textual data.
×
×
  • 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.