Jump to content


  • Posts

  • Joined

  • Last visited

Previous Fields

  • Languages
    XHTML, CSS, JavaScript, PHP, MySQL

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
    612 Wharf Avenue
  • Interests
    music, computers, internet, programming

Recent Profile Visitors

12,022 profile views

Err's Achievements

Dedicated Member

Dedicated Member (4/7)



  1. Hi, guys. This question is a bit off-topic, but I rather ask it here than any other site because I know there are some very good developers on here and I'd appreciate their answers more. I've recently started re-skinning HTML pages, as in, moving the content of a page into a different page layout. Basically changing the footers and headers and leaving the content the same. I had an issue of coming across a badly coded page, which I fixed and submitted to the customer. The problem is, the customer doesn't want those errors fixed because it affects the CSS a bit, a CSS bug which I tried to fix but the customer would not accept it. He wanted the re-skinning of that page with those errors still there. I explained to the customer that I do not code that way I would never submit low quality work like that. The customer acknowledged, and feeling a bit conflicted I went ahead with the customer's request. I know some customers don't know about HTML rules and what not, but this customer has no excuse for not knowing this. What can I do about doing this type of work? Technically I am meeting the requirements the customer is requesting and it's not like I can complain to my boss because its within the work that I'm suppose to do. I want to avoid giving myself a bad reputation and I certainly do not want other employers seeing that I even touched this. It does not stop there, it is very likely that I will be having to do this again very soon. I don't want to lower my standards, but I am obligated to do my job. It's a bit of a conundrum.
  2. This could help you: http://stackoverflow.com/questions/2699086/sort-multidimensional-array-by-value-2
  3. Aren't you suppose to be returning the date instead of echo'ing? function getDate(){ return date("l, M j, Y g:i:s A T");}
  4. Err

    check dir

    $file = $dir.$conn_id;if (file_exists($file)) { echo "file does exist";} Try that. If that fails put var_dump($dir,$conn_id); and post the output of that here on the forums.
  5. It's JavaScript that is doing that. You are messing with DOM stuff and it will try to close any tags you don't close. The only way I know to go around that is to simply load the response into the variable instead of printing it on the screen.So instead of doing this: document.getElementById("idn1").innerHTML=xmlhttp.responseText; Do this: var str = xmlhttp.responseText; After you do that, append anything you want to that string, THEN use innerHTML: document.getElementById("idn1").innerHTML=str;
  6. Named after a television character I like.
  7. $_POST['firstname'] gets assigned to $firstname in that line but it does more than that, so you should do the same for all variables. So something like this: $firstname = (isset($_POST['firstname'])) ? preg_replace("/[^A-Za-z0-9]/","",$_POST['firstname']) : "";$lastname = (isset($_POST['lastname'])) ? preg_replace("/[^A-Za-z0-9]/","",$_POST['lastname']) : "";$company = (isset($_POST['company'])) ? preg_replace("/[^A-Za-z0-9]/","",$_POST['company']) : "";$phone = (isset($_POST['phone'])) ? preg_replace("/[^0-9]/","",$_POST['phone']) : "";
  8. That's great. Can I offer some suggestions?I know you got your coding working like you like but there is a better way you can write your variables. Instead of doing this: $firstname = "";[...]$firstname = $_POST['firstname'];[...]$firstname = ereg_replace("[^A-Za-z0-9]", "", $_POST['firstname']);$firstname = strip_tags($firstname);$firstname = stripslashes($firstname); You can do this: $firstname = (isset($_POST['firstname'])) ? preg_replace("/[^A-Za-z0-9]/","",$_POST['firstname']) : ""; You can put that at the very beginning. Basically, it checks if there a POST variable named firstname, if there is only allow A-Z a-z 0-9 and apply it to $_POST['firstname'], else just make it an empty variable. You should be using the preg* function since the ereg* function are outdated, even more so than mysql*. Since you are using the replace function to remove any characters you don't want, using strip_tags() and stripslashes() won't do anything more. You can do the above code with all your POST variables.
  9. I see the $con variable but I don't see from where you are getting it from, it just suddenly appears. $firstname = mysqli_real_escape_string($con, $firstname); I think you meant to make a connection first, then do the above code.
  10. Err

    finel edit

    If chater is an array you can loop through the numbers and assign back3 every time. var cnt = chater.length;for (var i = 0, i < cnt; i++) { $("#mem"+chater[i]).class.back3;}
  11. Err

    SHOW DATABASES is slow

    SHOW databases The above query is slow on shared MySQL hosts. Is there any way I can use a different method that would be faster in general?
  12. I'm glad I'm getting feedback but if you can't think of a reason then I'm sorry to hear that. It's freeware as of now but maybe donationware later. Very neat trick. I saved the snippet for reference, could come in handy.
  13. I never claimed that my program is secure because it is different than phpMyAdmin. It is one feature that the file name can be changed but it is by no means my only security measure. That is the main point of posting my program here, I need debuggers; I am actively trying to find bugs and vulnerabilities in it, then I try to address them as quickly as I can. Of course, I am a single person that's doing this but my program is no where near as complex as phpMyAdmin. As for people installing phpMyAdmin. Great, if you can install or use phpMyAdmin then do that. If you can't get access to it or don't have permission to install it (as in people saying 'no') for whatever reason, then my program is a reasonable alternative.
  14. I'm confused. You say you want to decode it, but when it decodes the HTML, it now won't show the HTML?
  15. Links like that won't work. You would have to do something like <img href="mysite.com/xxx-xxx-xxx-xxx.jpg"> so instead of 0000.txt it is xxx-xxx-xxx-xxx.txt. Inside of xxx-xxx-xxx-xxx.txt could be the link to the image and the name:xxx.xxx.xxx.xxx.txt: img: http://mysite.com/xxx-xxx-xxx-xxx.jpgnam: Homer Simson Or, you can use just one text file and just put the ips, names, and images inside there.data.txt: ipx: http://mysite.com/ Homer Simpsonipx: http://mysite.com/ Lisa Simpsonipx: http://mysite.com/ Bart Simpson[more... more... etc] Then you can use functions to extract the data based on the IP address.
  • Create New...