Jump to content

robos99

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Everything posted by robos99

  1. You need to look around more on the paypal website. Download the API integration guide...or something similar to that. I can't give you specific advice on the SOAP method since I use NVP, but I know there is a PDF out there with all the information you need. However, after seeing your other post, I don't think the paypal API is what you're looking for. With the API you collect the credit card information directly on your site, and send all the information to paypal. DoDirectPayment is using credit cards, not paypal accounts. You'll want the express pay API if you're looking to have people pay with paypal only. If you don't really know what you're doing I don't recommend you collect any credit card information on your site. If your security is lax you could be held liable for any losses. Not to mention it will be easier for someone to defraud you. It's a good way to lose a lot of money, and it's a lot more complicated than a simple buy it now button. Stick with the IPN for what you're trying to do. But you should be able to find all the information you need on the paypal API in the developer section of their website. In fact, here's a link directly to the documentation: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_documentation
  2. My guess would be, in your first example you're not referencing just the array, but the array slice 'doesnotexist'. This doesn't exist, but since you're passing it to foreach in that manner, the fuction might be assuming that 'doesnotexist' is also an array. And since it doesn't exist, PHP is initializing it when you run foreach. At least, that's my theory.
  3. It'll help if you post some code of where the problem is.
  4. It may not be the most liked practice, but it's fairly typical from what I've seen. Personally I'm not going to make a big deal out of being "robbed" of a few minutes. I just learn the pattern of the time clock and take advantage of it, haha.
  5. You'll probably be better off learning the basis BEFORE attempting to run them. For me, I started reading up on all this stuff before I even wrote a single line of code. If you don't know HTML/CSS either, you really are better off starting from the beginning. While you don't exactly NEED HTML/CSS to use PHP, if you want to output anything more than a basic "hello world", you might as well learn it. Plus HTML is easy.
  6. If this is a timeclock, you'll need to consider just how the hour is broken up. Most companies pay you in 15 minute increments, and they have rules set to determine at what point the current 15 minute block will rollover to the next one. As in, punch in at 3:47 it rounds you to 3:45, but punch in at 3:55 and it rounds you up to 4. Unless of course you want to pay them for exactly the amount of time worked and not round in 15 minute blocks.
  7. A CSV file is just a comma delimited file. I'm not sure but it doesn't look like you're delimiting anything with your code. Open your CSV file in a text editor and see what it's printing. If your data fields aren't actually delimited with a comma, then excel probably won't open it as a CSV file...or at least it will open but be all messed up.
  8. Did not work. First, I used an email address I already had an account with there. Not sure if you want to allow that, but you may want to check for it. Second, this is the code I got in my email: <a href="http://www.everkleen.biz/testforum/forum/validate.php?usr=$user&key=(md5($rand))">http://www.everkleen.biz/testforum/forum/validate.php?usr=$user&key=(md5($rand))</a></body></html> As you can see, the variables are not being displayed, only as their actual name. Try removing the single quotes, and that should fix this. So, something like this.... $message= "<a href=\"http://www.everkleen.biz/testforum/forum/validate.php?usr=$user&key=" . (md5($rand)) . "\">http://www.everkleen.biz/testforum/forum/validate.php?usr=$user&key=" . (md5($rand)) . "</a></body></html>" Also, I'm a bit confused by what you're doing within the link. Is there a reason why you're calling md5() within the email body itself? If you're calling it here, what value are you storing in your DB?
  9. If you're getting the variable $_POST['file'] from a file upload, I beleive that only contains a pointer to the file, and not the actual file name. Double check the PHP manual on this, but I think you need to pull the file name from the $_FILES variable.
  10. Cory, Your questions are beyond that of a basic admin panel. The admin panel is just the interface that allows you to control all of these settings. But the tasks you want to do describe more of a user authentication system, a content management system, and I'm not sure what you were talking about for that third part "Ability to view a request, do it, upload it.. then have the uploaded file show in a php page..". In the most basic form, this is about database interaction. There may be ways to do this without using a DB, but it would be easiest to go that route. I'd read up on some more tutorials first so you can get a basic grasp of writing database driven websites. You gotta crawl before you can walk. That means learn the principles of MySQL (or whatever your DB of choice), and figure out how it all interacts first, before you decide to tackle complex projects. Creating a user authentication system and making it very secure and doing it right is no small task. At the very least, you'll want to read up on database usage, as well as sessions and cookies. It would also be wise to start learning object oriented programming, as this will make writing your entire site much easier and much more organized. Where to look? The PHP website for one, www.php.net, has excellent documentation. Other than that, find tutorials that cover this stuff. I know www.sitepoint.com (hope I'm not breaking any rules linking to a competitor...) has tutorials for OOP, database integration, and user authentication systems. Learn the basics first, then write some simply little programs to test what you've learned. If you go this route, when you finally start writing the actual program it will come much easier. Plus you'll probably spend WAY less time debugging. A few tidbits to get you started....watch out for register globals and mysql injection attacks (there was a third tidbit but I forgot it, haha)...google these terms and understand them. You need to combat these problems if you want to make a secure website. And then when you're all done post it here to see if anyone here can break in. haha.
  11. First suggestion.... You should set up your register forms to post back the data you already entered in the event of an error. Plus it'll be good practice for you to learn this. What I'm saying is, if some part of the registration fails, reload the form with the info you already filled in, except the bad data. People hate retyping things. Second, I filled it all out, got the verification email. I would suggest you go with a verification link instead of having someone type in a verification code. And, I logged in without doing anything with the verification number and it logged in anyways, without the verification. Plus, as blade mentioned, when you log in it just says forum and nothing else.
  12. Looks like you're trying to set session variables after sending output. There is a post at the top of this forum explaining this entire problem...it's very common. But basically, you can't set session or cookie variables after you've already sent any output. This has to happen before headers are sent. So take that bit of HTML and put it at the end of your code. It doesn't appear you really need it at the top anyways, it's just sending a header. Make sure all your include files also are not outputting anything before you've set session and cookies. That includes any whitespace that may just be after the end of the tag. I spent an hour trying to fix that one once! lol
  13. Can you show us exactly what is in the image column? Assuming you have just the image name, you might want to try something like this: echo "<img src='path/to/your/image/" . $file_realname . "'>"
  14. I'm a little rusty on file uploads but I don't beleive you can use $_POST[userfile] as your file name, which I think is what you're trying to do. You need to use $_FILES['userfile']['name'] combined with your path to where you're storing the image files to create the full URL to the images. Alternatively, you could just store the file name in the database, and when building your links on the other end include the static path to the images.
  15. You're incrementing $photo outside of the while loop. Move it to within the brackets and it should work.
  16. For me, the easiest way to design a DB structure is to sit down and really think about everything you'd want this script to do and what data you'd want to collect. You write that down, and start to figure out the appropriate names, primary keys, field lengths, data types, and your table structure. A good rule of thumb is to never include something more than once. For example....you'll likely have a table for PMs, including mostly the fields that extrovertive mentioned above, and whatever else you might need. Each row in this table is going to belong to a new PM. So if you have some data that is going to be the same in several rows, it would be wise to put this data into a separate table. I'm having some trouble thinking up an example using PMs, so I'll give you one along the lines of Ecommerce. If you had an online store, you'd most likely have a user table, where all your user's info is stored. But say you want to start storing information specific to each order, to keep an order history. It would be bad design to have an order history field in your user table, since each user can have more than 1 order. So you'd make a separate table. Same works with your PM situation. Just think about what data might be shared. A user can have more than 1 PM, so that means a table specifically for PMs is required. But what else might a user have more than 1 of? Or what data might be used by more than 1 user? Think of that when deciding what goes in your tables.
  17. "everytime i want to add a member i want 1 to be added so that it goes: mem0001, mem0002 etc" I know you said you know how to do this, but you do realize that the numbered portion is still going to be a string right? So you can't just say $numbers++ because you can't perform math on a string. I'm sure there's a way to convert data types....but I'm not sure off the top of my head.
  18. What exactly is the problem you're having? Your list of values...are those just the possible values for your gender column in the DB? Or is that entire list in the gender column?
  19. set error_reporting to E_ALL, that should help you find out what's going on.
  20. Without reading all of what you posted, you could still use a template based setup to "skin" the forums. Simply use a placeholder in your HTML template for where the CSS should go, i.e. %css%, and then use strreplace to replace the placeholder with your actual style sheet stored in the DB (or from a file). This would be the easiest way to do any type of templating system. Using php variables within templates gets rather complicated. Using this method you can let your users select from an assortment of themes, and just have the theme stored within their record in the user table. Have a themeid number correspond to the actual table row where the css is stored, don't store the css directly in the user table.
  21. I beleive that attempting to order by a text field will result it in being returned in alpahbetical order, which is of no use for dates. Your best bet is to either use a datetime or date column type, or use an interger column type and use unix timestamps. You complained about the forced format of the dates....with a unix timestamp you could really just format it for anything you like, but you can do that with the datetime and time column types as well.
  22. Try putting single quotes around the variables inside the query.
  23. You should add some padding after the "myshout" text so the scrolling bit doesn't run right into it...looks a little messy.
  24. put "or die" after all your sql functions. my guess is either your select_db is failing or the query itself is failing. you can also test to see if MySQL successfully inserted your data by doing this: [code]if(mysql_affected_rows($connection)==0){ echo "Insertion failed."; } [/code] Also put this in at the top of your script when debugging: [code]error_reporting(E_ALL);[/code] This should give you some info on what is going wrong. To answer your other question, the reason it's saying that it added the info is because you don't have an "or die" statement after your query or select_db. So even if it did fail, PHP just continues and echos whatever you tell it to. That's why you want to put "or die" after everything...actually it'd be even better to write an error handling function but that may be over your head.
  25. I'm not seeing why you'd need an array to do this at all. [code]$new_word=$existing_word . $letters;[/code] Is that what you're trying to do?
×
×
  • 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.