Jump to content

denno020

Members
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by denno020

  1. If all of the site is in one file, it could almost make it slower. That file will obviously get bigger as more code is added to it, and therefore a larger file size will equal slower download. If you put your website across multiple files, then only the files that need to be loaded for that page will be loaded, and could mean it's quicker? I don't know if this is true in practice, but I thought it's something to think about.. Denno
  2. I'm not sure what you mean by cron jobs, but the way I would implement your membership system is by the following: User signs up, a database entry is created with their username, password, (any other details), sign up date, and expiry date, depending on the package they choose (so add 30, 90, 365 days to the current date, and place that in the expiry date). When a user logs in, check database for their username/password, if found, set a session variable, then check the expiry date. If the current date is passed the expiry date, then they no longer have access to the extra stuff, and are told so, however their account isn't deleted or anything, so they can top up thei credits. Tutorial (series): Enjoy Denno
  3. I don't like the way the text is. To me, the site looks like it's a pop up ad, like spam. I think you should make your headings in a different font or something.. Also, the graphics around the top of the curve, they're really pixelated.. You should try and smooth them out.. Denno
  4. In what way would you like a membership service? For people to sign up to a newsletter, or so that people have access to different parts of your website? You can find heaps of tutorials on how to do this yourself, should you want to save the $$$ Denno
  5. I can see in your example code what you're trying to show as the problem, but I can't see the problem in the screenshot? Also, why are you mixing tables and div's? It makes ur code look pretty confusing, and I'm not sure why you would want to use them both? Denno
  6. Have you tried to echo the variable values to see what happens? If that doesn't work, then yes you can easily output the values to an external txt document. There is plenty of help on the web on how to do this. But I would first actually try to echo the value, as I'm sure it will work. Denno
  7. It took me a minute to understand what you meant, so I though I would post some code to illustrate your meaning, so it's easy for the OP and anyone else to see what to do. example.php //declare the variable $InsertPageTitle = "Contact Form"; //before you use it in the following file include('header.php'); Correct me if I'm wrong, but I think this is what Pikachu2000 is referring to? Denno
  8. <!DOCTYPE> <head> <title>MyWebsite | <?php $InsertPageTitle ?> </title> </head> <body> Have a crack at that buddy. You need to jump into php so the browser (or whatever is creating the page) knows that it's in fact a php variable that you want, not just the text that read $InsertPageTitle. Denno
  9. in the sample code I gave above, you wouldn't echo $fileName, you would echo $contents... Denno
  10. sorry I can't understand your code. I don't know where onLEAVE or ACTIVE has come from to be put in your SQL query, there is no row called those names. Also, the date stuff at the start didn't work at all for me. It's too hard to follow your code, sorry. Denno
  11. You will use $contents = file_get_contents('$fileName') Where $fileName is the full path to the file you want to read (or possibly the path from the location of the script). You then echo $contents into the value part of a text area, and you can go ahead and make your changes. Saving is a matter of passing the edited contents (so the data in the text area) into the function file_put_contents('$fileName','$contents'); I just did a simple google search to find that information, I have never used it before, I simply read the information on php.net and suggested you try it. Search google for the function names if you want more information on them, as well as examples of them being used. Denno
  12. Your links don't work for starters, As for the SQL syntax problem, you can only have one LIMIT value. Get rid of the comma and the extra value after that. Post back with what that does. Denno
  13. Can you please give me some SQL so I can create the table on my end and test out changes? You should be able to just export the staff table and post the data here. You can delete all values, I just want the structure of it . Denno
  14. I too grabbed my IPN script from PayPal Developers site, however I still had to test it extensively, as it didn't work right away. There is a few settings that need to be changed in the seller settings of the PayPal account. It's not simply a matter of uploading the script to your site and then it all works. I suggest you look for some YouTube videos on how to set up PayPal IPN. If you can't find anything after giving it an honest look, I'll help you with what settings need to be changed. Denno
  15. To be able to display a link to the file in question, all you need to do is this: echo '<a href:"' . $row[imageAddress] . '"> Link to File</a>'; Depending on what is stored in $row[imageAddress] will depend what directory information you need to place before it, so like this: echo '<a href:"C:\wamp\www\files\' . $row[imageAddress] . '"> Link to File</a>'; Hopefully that can get you on the right track Denno
  16. How do you know that your IPN script is already actually working? I have just been tinkering with IPN myself, and was thinking of adding exactly what you've done, however I didn't anticipate any problems. You are setting up your test data in the IPN simulator to send a payment of exactly 29.99 and that the currency is in GBP? So basically, are you absolutely sure that your script is working, and that you are getting into the if statements correctly? Denno
  17. I can't get the script to break on my end, but maybe I need your set up to be able to call it right? Anyway, do you understand what the if statement is saying? Simply removing $capatcha == 6 || should do the trick. But make sure you get rid of the brackets too, as they're no longer needed. So your code would be like this: if ($author && $message && controlPosts::isAdmin()) Without being able to replicate the error on my end, I won't really be able to help. Have you got anything I need to be able to try and run your script? Denno
  18. Flag was a bad term.. What you should do is have two more array elements names pages2 and pages 3 (and rename the first to pages1 for consistency). You will then have: if ($permre['pages1'] == indi_add)// {echo "show page";} if ($permre['pages2'] == mass_add)// {echo "show page";} if ($permre['pages3'] == export)// {echo "show page";} Although on second thought, looking at that, you could just make them a boolean in your table, and check to see if it's a 1, in which case you would show the page... Example: if ($permre['indi_add'] == 1)// {echo "show page";} if ($permre['mass_add'])// {echo "show page";} if ($permre['export'])// {echo "show page";} First thing you will notice is that in the second and third iff statements I've removed the '== 1'. If the result is only going to be a 1 or 0 (which is how you will set up your table), then if, for example, $permre['export'] == 0, then the if statement will read as: if(0){ echo "show page"; } A 0 in the condition means false, so the code will not execute. It's up to you how you want to code it, you can leave the '== 1' in there so it's obvious to anyone reading your code exactly what you're doing. So what you need to do with your table is to add 3 columns, with type ENUM, and options of '0','1'. If I've missed the mark with what you actually want, let me know, otherwise I hope that helps you . Denno
  19. Is it supposed to be streetx in CODE 2?? Denno
  20. Well for starters, only one of your if's are going to execute because you're checking the exact same array element against 3 different values. It can only be one, hence only one of those if statements will run. If you want the possibility of all 3 running, then you will need to save the flag to allow it to be shown in a different array element, if that makes sense. Do you understand what your code is actually saying now? Denno
  21. You're going to have to specify what sort of encryption you're using. Are you encrypting the password as you insert it into the database? I haven't had much experience with encrypted data (using something likd md5), so I don't know how you're supposed to read it back out... But I'm sure other people will want to know the above to be able to answer your question. Denno
  22. All I said was this is what I think the cleansing functions will do. Read more carefully and don't assume things. Denno
  23. your braces are all messed up. I'm going to assume that the f at the start is infact supposed to be an if. Here is the code with the braces fixed up: f (action eq "play") { actiontxt = "playing tr. "; status = actiontxt add playtrack; tellTarget("tracks") { gotoAndStop("track" add eval("../:playtrack")); tellTarget("") { gotoAndPlay(3); tellTarget("") { tellTarget("") { } // End of TellTarget }//end tellTarget }//end tellTarget }//end tellTarget }//end if else { scale = "0"; down = "9"; actiontxt = "stoped tr. "; status = actiontxt add playtrack; gotoAndStop(3); }//end else Try that. Denno
  24. Then those people don't deserve to see a good website lol. You're pretty much screwed. I guess it's up to the designer which minority they want to rule out of getting full functionality from the website..
  25. what about people who have cookies disabled, and whom are scared of cookies (yes I know people who know very little about computer and think that all cookies are viruses). Using AJAX should mean no one would have problems, no matter their security settings. Denno
×
×
  • 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.