Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Artemis

  • Rank
  1. Hello everyone, My boss has two websites -- one of which they wanted me to clone to replace the other. They are on two different servers. They had me transfer the website files, reconfigure to a new database on a new server, and then make cosmetic changes. However, I am finding that none of the links on the clone (apart from the home page) actually work. For instance, if you click "What's New" this should link to the Who We Are page. The URL it links to is: /who-we-are (without any php extension). There is a .php file on public_html that is titled "who-we-are.php." The absence
  2. Hi, this is a general question based on the user registration scripts found in the back of this book. I was trying to create a single page which could call login.php and registration.php via includes() at the beginning of index.php; and then have two areas on a single page where the user could either sign up and be taken to the activation page, or where the user could login and be taken to the backend. Is there a way to do this on a single page without having to cut and paste the entirety of the two scripts (login and registration) into index.php? Is this how includes() can be used?
  3. Hi Larry, Can't thank you enough for that. I will email it to you as soon as I get back to my laptop.
  4. Hello! I hope it's alright if I have different questions about the same project. I am trying hard to try and debug these myself, but being a noob every now and then I run into a wall. I am trying to create a small user network to learn how it's done. Right now, I am working out how to add a "Add User" button to each user's profile, so if user A is viewing user B's profile, he can click the button and add the user. Now, by itself, my PHP code is fine. However, I wanted to use AJAX so a user can click on a button without taking them to a separate page and the add script (the actual insertio
  5. Hello! Thank you for your replies. I added the closing tag, which must have been erased in the furious deletion and insertion, and no luck. This is what I am trying to do so it is clear: the long script is essentially what will display a user profile in a larger community forum. The first three if statements refer to using $_GET to retrieve the right profile information from the URL's specification of the member ID... so that doesn't have anything to do with the problem. Essentially, what I am trying to do is to insert a code in here that will also allow the person whose profile it is
  6. Hi there! Thanks for your comment -- could you perhaps point me to which exact parts of my code you're referring to? I see that I'm posting the image data, but which GET superglobal am I using? Or am I missing something here?
  7. Hello there, Just wanted to tinker with it before I asked any more questions. The error messages disappeared when I changed the image upload script to this (where if (isset($_POST['image'])) was not there before). I am well and truly confused now, because nothing seems to indicate what the problem is at all. if (isset($_POST['image'])) { if (is_uploaded_file($_FILES['image']['tmp_name'])) { // Create a temporary file name... $temp = 'uploads/' . md5($_FILES['image']['name']); // Move the file over... if (move_uploaded_file($_FILES['image']['tmp_name'], $temp)) {
  8. Hi again, And thanks for the replies. I have tried to debug in two ways: 1. I applied error_reporting('E_ALL') to the top of both the long/short script; and it printed the following notices: a. Undefined index: image in .../users.php (this is the long script) b. Undefined variable: id in .../users.php (this refers to the if (isset($_SESSIONS('user_id'))) However only the first notice comes up in the image.php script as well, which uploads to the directory perfectly. 2. I tried to echo out each 'if' like so (and nothing came out of this either). You can see that this code
  9. Hello again! I am designing a small community for people online, and I wanted an image upload function for avatars. Naturally I referenced Larry's book and found the image upload code to help me along on my project. I first used the following code in its own right, and it uploaded the file directly to the uploads file indicated on my server. However, when I pasted the code into the script (having changed the form action to the new script's name) the image upload function stops working meaning it does not upload any file to the uploads folder. I don't know why this would happen because I don't
  10. Hello! Sorry to reply to your posts so late, but I'm very thankful for your feedback and implemented both a Java/PHP validation system on the site...
  11. Hi again! I took your advice and downloaded a generic JavaScript validator from a website as I'm not familar enough with it to do all the coding myself. The Java works in terms of validation and I thought it could be integrated with the PHP, which would handle the submit function and pass the info along to the database. But that's not happening. Any idea why? New code below and you can see what the page is doing if you visit forensicoutreach.com'signup.php. Any help is appreciated... <?php // signup.php // Include the configuration file and the HTML header. require_once('include
  12. Hi Stuart, Thanks again for all of your help. I'm pretty good with XHTML/CSS but I'm slowly learning how to make sites dynamic -- and thereby deal with JavaScript and PHP. I will look into using JavaScript as well for validation as it seems to make sense to do so. Thanks for the compliment as well!
  13. Hello again! I've tried to implement your suggestions and basically created this statement to print the $errors array. <?php if (empty($error)) { echo '' ; } else { for ($error = 1; $error < count($error); $error++) { print $error; } } ?> Needless to say, it's not working. I tried writing just the if statement first to check if the array was empty, and that bit worked when I just asked it to print "Empty" or "Not Empty." Then my approach was to add the for look you suggested to print the array, and that's where I'm really stuck, because it's not pri
  14. Hello! Another post about the site I'm developing. Essentially I have adapted the login.php script and register.php (which I call signup.php) to use on my website. The messages that come up if you forget to type in your email, password; enter an invalid password; or enter passwords that don't match, appear the same as they would in the book if you were to attempt to sign up. See what happens here: forensicoutreach.com/signup.php. But as you can see, it does not fit in the with the look of the site and they kind of float right underneath the nav bar. How could I change this so that the
  • Create New...