Jump to content
Stef's Coding Community


  • Content Count

  • Joined

  • Last visited

Everything posted by debmc99

  1. Perfect - thanks Ben!
  2. Hello, I have a login system working (which I did from the Killersites University videos). I have a member's table set up in my database and all works well. My question is, what is an easy way to only have the admin username and password redirect to a page called download.php? Currently, when the admin logs in they are redirected to a page called members.php along with all other users in the db. So I made a new page for the admin to login. What I would like is for them to type in the username and password and go to download.php. The site is hosted on godaddy (not my choice) and I
  3. Yes, that makes sense. I don't think I can do that though, at my skill level. I have spent about 3 days on this already. I may have to just save the files in the db because then I can follow your CRUD tutorials and also add the Delete option like you have in your records table. But I will give your suggestion a try. Thanks Ben.
  4. Hello, Yes, I did try your code earlier to see if I could read what was in the db and it worked fine (thank you!). I can list the file names in the db, but again, I am only storing information, the actual file is in a directory on the server, which is what I need to get to, but also how do you make those files downloadable, as in show up as URLs or something that are clicked on and then the Save As dialogue box opens?
  5. Hello, I am trying to download files from a server. I need the file names to display and then, from what I have researched, I need to force downloads. However, the original file names, file types and paths are stored in mysql and the file itself, when uploaded, gets moved to its own directory and has md5 added to the name. BeeDev was kind enough to post the code below, which is helpful, but it seems to look for a specific file and I need to list all .doc, .pdf files, etc. I have been looking on Google for two days to find out how to do this. Can anyone tell me how I would list all the fil
  6. Thank you for the help. I will give it a try. Another question I have is, regarding this line of code: $dbLink = new mysqli('$host','$user','$pass','$db'); Is it ok to hard code the connection like this? I looked at the manual on php.net and the example shows this: $mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db'); Just wondering if this was ok or if I should be using includes. Thank you.
  7. Hello, I now have an upload form that stores the uploaded file outside the database and in its own directory on the server. The name, type, size, and path are stored in the database. I have two questions: First, I am concerned about security and want to make sure I didn't make a glaring mistake. If anyone could take a look at my code below and let me know if I left a vulnerability somewhere, I would greatly appreciate it. The upload form itself can only be accessed by members who login, not the general public. The upload page will have an SSL certificate. Upon uploading, the original f
  8. Actually, I am setting up a website where only a few people will have access to a login area, and upon successful login, will be directed to a page where they can upload some Word docs and pdf files, etc. It is not meant to be a heavy storage thing, just something that is secure since the files will have personal information in them and easy for me to set up. It also needs to be easy for the client to access the files. That being the case, I was wondering if storing the files outside the database is still the best option? I just want to do what works best in a situation like this. And aga
  9. Hello, Your solution worked perfectly! Thank you very much!
  10. Hello, I am trying to use this script below to store a .pdf or .doc file in a MySQL database. I am getting the following errors when I test it in WAMP: An error accured while the file was being uploaded. Error code: 2 Notice: Undefined variable: dbLink in C:\wamp\www\my_php\blob\myblob\processfile.php on line 47 Fatal error: Call to a member function close() on a non-object in C:\wamp\www\my_php\blob\myblob\processfile.php on line 47 I am trying to understand how all of this works, but it seems like $dbLink was defined in script already when I connect to the database. Can anyone e
  11. Hello, I just finished the php login tutorial which was great and I learned a lot. My question is how would you go about stopping the php pages with your database connectivity information from being crawled? Do you use a robots.txt file or use a meta tag? Thank you.
  12. Sorry, that worked. Thanks.
  13. Hello, I am doing the simple login tutorial. I am currently on video #3. When I test the login.php page I get this error: Fatal error: Call to undefined function mysql_report() in C:\wamp\www\my_php\login\login_project\includes\config.php on line 10 Here is the config.php code: <?php /* * LOGIN.PHP * Log in members */ //start session / load configs session_start(); include('includes/config.php'); include('includes/db.php'); include('views/v_login.php'); ?> I am using WAMP and Eclipse. Perhaps I don't have the path to the database configured correctly? D
  14. Thanks Ben, There was a problem with the get_shopping_cart() function. It is working at the moment. Thanks for your help!
  15. Here is the exact error message: Fatal error: Call to a member function AddItem() on a non-object in C:\wamp\www\my_php\shoppingcart\PaypalShoppingCart\html\addToCart.php on line 14 Line 14 is this: $shopping_cart->AddItem($product_id); Here is the code: <?php require_once '../functions/functions.php'; $shopping_cart = get_shopping_cart(); ?> <?php echo render_header('Pasta Shop: Catalog');?> <?php $product_id= $_REQUEST['id']; if (product_exists($product_id)) { $shopping_cart->AddItem($product_id); } ?> <?php function render_shopping_cart
  16. Hi. I hope I am in the right forum. Sorry if these are dumb questions but I am a beginner. I purchased the PHP Shopping Cart video tutorial, I have wamp and eclipse installed. Everything was going fine up until video #7 - Building the Shopping Cart Object. I am typing the code along with the video. But when it is time to test it I keep getting errors like this: Fatal error: Call to a member function EmptyCart() on a non-object Eclipse is not showing any errors. I have typed everything exactly. When I look at the source file in Firefox I see this: EmptyCart(); echo render
  17. Hello, I accidentally replaced the index.php file in Wampserver (I am doing the killerphp tutorials). Is there any way to get another copy of that ir do I have to reinstall the whole thing again? Thank you.
  18. Thank you both very much, your comments were very helpful!
  19. I know a little WordPress. A possible client wants me to set up a site for them using Joomla. I have never used Joomla before and I certainly do not want to charge them for my learning time, nor do I want to charge the going rate for a Joomla site since I am no expert. Does anyone ever have this problem? I would love to know what you do in these situations. Thank you.
  20. I read recently that more and more people are accessing the web content on their cell phones and mobile devices and that the trend will only continue. If that is the case, would it be wise to (first learn) and then try to offer current clients mobile versions of their sites? Or do you think most people will go to an online resource to convert their sites to a mobile version. I guess I am trying to decide if developing mobile content is worth learning how to do or not. I have googled for hours trying to research this. I have also tried to find current tutorials to start to learn how to cre
  21. All is working now - he just needed to refresh the page. Thanks for your help!
  • Create New...