Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Test this in firefox using firebug with the net tab open and see if your script is being called, and if a response is being returned.
  2. So I'm guessing here that what you mean is that you have some text that should be inside some sort of html markup? and you want this text to have a style applied? I'm just guessing here because you've offered very little for anyone to understand what you're doing or why. If so, you need to apply the style to the html tag, which you're not doing. $sometext = 'Hello phpfreaks'; echo ' ' . $sometext . '';
  3. How would you expect this to work when it's calling an asp script and your serverside script is php? xmlhttp.open("GET","gethint.asp?q="+str,true);
  4. If you want to echo out a string, you can either concatenate it together using the '.' to stitch different parts of the string together, or you can use php's ability to interpolate (combine variables and string constants) together, replacing the variables. I'm going to guess that what you want is something more like this: echo $test . 'class="somecssclass"';
  5. Looks like the array you want is nested inside 2 others. So try: foreach $yahooterms['ResultSet']['Result'] as $replace) { echo $replace; }
  6. This is what I would recommend: http://jquery.com/ http://api.jquery.com/category/ajax/ You write a script that does session_start(), checks that there's a valid user and if so, calls an update function you write that will update the status of the user -- usually via a datetime column in the database named something like lastseen. In your jquery you make calls to this script based on the setInterval() javascript function. One reason not to use the onbeforeunload() event as suggested by russelreal, is that this would be problematic in certain circumstances where for example, someone opens up multiple tabs to your site for the same session, which is easy to do with current browsers. If you assume that because someone closed a tab they were logging out, you could get in a situation where you logged someone out who still had an open window on your site.
  7. How are you looking at the headers? Keep in mind that there is a request (the browser) and a response (the server). The server will send the cookie. It's only an issue if the response has cookie data in it. With that said, there is no problem if you're not getting the url parameter or hidden form elements. As to your previous question-- yes passwords will be sent in cleartext. That is the nature of HTTP. So yes, the only way to insure that the data is secure end to end is to use https://.
  8. We really need more info beyond "not working". Are there errors?
  9. I don't see any major problem with the code. Just looks like a case of there not being permissions for that user or the password not matching. Do you have a shell on the host, where you can try logging in with the mysql command line client?
  10. There is hope for you yet it seems. I mentioned the best practice of seperating markup from content. If you went through and found all the places where you are outputting markup and moved those into seperate php files, you'd be left with the basic logic of your site. Many people implement simple template systems doing only that. If there is substantial value in your code, you'll be able to repurpose and reuse it in a new site. In the thread on crmamx's site I have a response early on where I recommended a basic skeleton structure with a junction box/controller script. Take a look at that post, and read through for followups. Get firebug for firefox and learn how to use the inspect feature in order to analyze what other people are doing, and how they achieve specific effects. I feel like I'm repeating things that are in the thread I linked. I would rather see a minimal/stripped down site at this point, that was based on simple/clean markup and html and some basic structure, with a basic style sheet that starts with a reset and provides a minimum of styles. Once you have that, it will become a lot clearer to you that this is not a journey of a thousand miles. I've been doing web development since the WWW started, and I still learn something new on a regular basis.
  11. We are not magicians, but that warning is crystal clear. Your mysql_connect is failing. You need to post your code if we're to have any chance of helping you. Use the php bbcode if you do.
  12. His approach is entirely different than yours has been. This is the result he achieved: http://bayarearcsociety.com/. And the site is *deep* in terms of features and content. I don't have a link to his original site for comparison purposes, but our criticism included many of the same complaints about yours. When he was advised to redo substantial elements of his site, and do what essentially was a ground up rebuild, he dug into it, read materials, studied and came back with pointed questions. In a nutshell, he was was open to suggestions and listened to the advice he was given, and flat out worked his ass off, and the results speak for themselves. Your site is a blob of nested tables. That is not how sites are done in 2011. You need to start from scratch. Sorry but that is the bottom line. If you're truly interested in learning how to make a quality website then you'll go back to the drawing board. Take a look here: http://www.csszengarden.com/ Click on some of the designs on the right. Realize that every design is based on the *exact same html markup*. All they are able to do is add a style sheet with images. Hopefully it will open your eyes to how completely off track you are. This thread has a lot of excellent discussion that is probably highly applicable to your problem: http://www.phpfreaks.com/forums/index.php?topic=323872.0
  13. There is still a lot of chatter on the symfony dev list, but since you're already using symfony 1.4, it makes sense to me that you'd go with symfony 2.
  14. Yes it should, but you also need to check that the form is not passing a hidden parameter. With that said, your assumption that your browser is not accepting cookies might be invalid. If you're not seeing the url param, or hidden form parameters, and you're still seeing sessions in operation, then I'd question your assumptions. For testing, I would use firebug to analyze what is going on.
  15. Was this supposed to add something to what I already provide (the actual query needed?)
  16. Yes, that' s exactly what I meant ... it is essentially the many to many table, having the two keys, (project_id, customer_id). Then you do a standard inner join between that table and customer, as you mocked up, specifiying AND project_id = 'whateverprojectid'.
  17. Russell, The way I read your reply, it seemed to be saying that you could substitute one for the other. I will agree with you that you can use that function in most of the current browsers, but regardless, an ajax call is going to be needed. At the point that you are going to make an ajax call to indicate that the person has an active session, I think you might as well update the status periodically, but onbeforeunload() is a viable solution as well.
  18. Strictly speaking, there are two concerns here that are being discussed. Session fixation and session hijacking. Session Fixation is basically one approach used to attempt to hijack a session. This is an old, but still highly relevant discussion of Session Fixation-> http://shiflett.org/articles/session-fixation In terms of the settings, check these. These are the defaults with php5.3 session.use_trans_sid 0 session.use_only_cookies 1
  19. RusselReal, Those are not the same things at all. A timed ajax call can update status every 30 seconds or minute or 5 minutes. That technique is frequently used to support html/near realtime chat pages.
  20. No you can't detect if someone changes the url. What you can do is utilize ajax to make periodic updates to a script on your site, which you can use as an "activity" monitor. Very few people actually logout of a website -- they just navigate away or close the browser. You should not depend on a logout.
  21. You're getting the error because your string is delimitted using double quotes, so you'd have to escape them all which is a major pita. You can get around this (while still preserving interpolation inside the string, by using a heredoc. $somevar = //... all your markup including variables, and double quotes is fine HERE;
  22. stevengreen22, I'm guessing you aren't aware that a lot of people have computers these days with 1920x1280 or greater resolution. Now in regards to your response to cssfreakie, I think you can tell from his username that he takes css and design pretty seriously. He pointed out that you you are displaying two validation badges, that somewhat comically show that your site isn't even close to validation, and when he pointed this out, you made excuses, when the proper reply is -- ok, thanks let me get busy fixing those. Then you went on to dismiss many of his points, which if anything were expressed diplomatically, and needless to say your response turned personal and combative. Not a great start. As for your php code, we haven't seen any of that, and this isn't really the place for a discussion of your code, but I'm going to go out on a limb just based on the general level of ineptitude on display, and warrant a guess that your code is not very good at all. For example, while looking at your site, I noticed a broken include that was spitting out an error where content should be. Since this is, I assume your production server, it shows that you're not even aware of what the proper error settings should be as you leak out errors for the world to ponder. Sure people might sugarcoat this, but I don't see the value of that. Your site is dated, amateurish, beyond ugly, full of bad html code, inconsistencies, non-standards compliant html, cruddy images, etc. And to make matters worse you've revealed yourself to be combative and resistant to the very constructive criticism you claim was your goal in the first place -- which is something we don't appreciate here. Stop defending the indefensible if you truly hope to learn anything. Realize that you are not going to get much "constructive" criticism on your present site, because candidly, it's a complete tear down. I'm not joking whatsoever when I say that there is not a single element you have that is worth saving, with the possible exception of some of your serverside code. You need to start over from scratch and go back to the drawing board with at very least, goals of: -Finding some sites that have the type of layout and design sensibility you would like to emulate and *study* their markup and css. -Focus on clean css driven design with semantic markup -having a seperation of logic and markup in your php code. I'd go further and suggest that you attempt to use a framework or at very least an MVC if you truly are interested in approaching what is considered best practice for the development of a modern website.
  23. If you're into Java and Oracle, the ODC's are great, but not cheap. Not sure there's much else to say, we get very few questions about PHP with Oracle, and as this is a php forum and not a Java one, you would probably get better advice over on the OTN.
  24. If what you are saying is that the project table would have nothing in it other than the projectid, then yes you could just have that table be the equivalent of the many to many and omit the need for a separate project table.
×
×
  • 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.