How do I fix my code to run the script to activate my membership

Well I altered my sql table to reflect what the code was asking for. Then I ran into an unexpected message:

Notice: Undefined variable: email in /home/content/53/8957353/html/activation.php on line 24
email=

Notice: Undefined variable: password in /home/content/53/8957353/html/activation.php on line 25
password=

1

I’m not sure I understand why this is happening. Attached is the code to activation.php code. What am I missing now?

[php]<?php
// If the GET variable id is not empty, we run this script, if variable is empty we give message at bottom
// Force script errors and warnings to show on page in case php.ini file is set to not display them
error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);
//-----------------------------------------------------------------------------------------------------------------------------------
if ($_GET[‘id’] != “”) {

//Connect to the database through an include 
include_once "connect_to_mysql.php";

$id = $_GET['id']; 
$hashpass = $_GET['sequence']; 

$id  = mysql_real_escape_string($id );

// $id = preg_match("", "", $id);

$hashpass = mysql_real_escape_string($hashpass);

// $hashpass = preg_match("", "", $hashpass);

$sql = mysql_query("UPDATE memberFiles SET email_activated='1' WHERE id='$id' AND password='$hashpass'"); 

$sql_doublecheck = mysql_query("SELECT * FROM memberFiles WHERE id='$id' AND password='$hashpass' AND email_activated='1'"); 
$doublecheck = mysql_num_rows($sql_doublecheck); 

if($doublecheck == 0){ 
    $msgToUser = "<br /><br /><h3><strong><font color=red>Your account could not be activated!</font></strong><h3><br />
    <br />
    Please email site administrator and request manual activation.
    "; 
include 'msgToUser.php'; 
exit();
} elseif ($doublecheck > 0) { 

    $msgToUser = "<br /><br /><h3><font color=\"#0066CC\"><strong>Your account has been activated! <br /><br />
    Log In anytime up top.</strong></font></h3>";

include 'msgToUser.php'; 
exit();

}

} // close first if

print "Essential data from the activation URL is missing! Close your browser, go back to your email inbox, and please use the full URL supplied in the activation link we sent you.



[email protected]
";
?>[/php]

Thank you for helping me but the solutions have given me a different error. When I try to login from the header, I DO get the login.php page. I enter my UN and password and get this:

Notice: Undefined variable: email in /home/content/53/8957353/html/activation.php on line 24
email=

Notice: Undefined variable: password in /home/content/53/8957353/html/activation.php on line 25
password=

1

My original changehad me alter the name of the table in the db. Was that the right thing to do or did I really screw up?

Butch,
I took a quick look at cakephp. That is a MVC system. That means that it is much more complicated than your current project. It is a “canned” program that is designed for various a quick-development type of system. This means that you would have to look on their site for info on that. I would not know where to start with that system. (It would take me a long time to learn it good enough to support it.) They should have a blog in their support pages to help you with it.

As far as your new errors. Show me lines 24 and 25 as I do not see an Email mentioned on lines 24/25 of the code you posted…

Ernie… Oh, no problem helping you, that is why I am on this site! You are welcome!

I am trying to link open source video streaming to an existing part of the site. The upload page appears to upload the video and takes me to the gallery but I cannot find the video in the member files nor does it display in the video gallery.

Well, in most open-source code, there is an area where you need to alter some parms that sets up your service for that program. In this case, my guess is that it is the “target-file” or “target-folder” of where the data is stored. I bet the video-upload section is saving the video somewhere in a folder and the gallery is not looking in that same folder.

I would check the code for the video upload and check where it is “moving” the file. When you upload a video (or any file), it is uploaded to a temporary file on the server. Then, you use a “move” command to move it to the final resting folder. Then, the gallery section would have to be pointing to that folder.

So, start with checking these folders first. Also, make sure the video actually is uploaded on the server’s folder. The “move” command may not be working and the video may be stuck in the temp folder.

Good luck, let us know the results…

It says that the videos should be uploaded to a file that they don’t appear in so I think they’re somewhere in cyberspace. I think it would help if I knew what this means: realpath(dirname(FILE)). Is this the absolute path and what is the proper way to fill this in?

Well, I guess I have to download this “canned” open-source system and install it to help you. Can you tell us where you got it from? So, we are on the same page. Thanks…

Oh, and also, when you see something like "(FILE) in a code, it is usually a “TEMPLATE” file. Which means somewhere in the system, either you or the code changes this to the filename of your data. “realpath” sounds like a function, “dirname(FILE)” is basically the “parent” directory of where the PHP script is running. So, it sounds like the videos are stored in the same folder as your PHP code only one level up. Not sure about that!
So, if you are in a folder, let’s say at: www.yourdomain.com/code/videocode/ , then, the parent location of this would be something like: www.yourdomain.com/code/ and that would be where the dirname(FILE) would be pointing. Not sure about the realpath function, you would have to look in that function to see where it is sending you…

Good luck, hope that all helps…

http://www.webrelatedstuff.com/articles/php-tutorials/ffmpeg-video-upload-conversion

Okay, thanks! The ffmpeg utilities are well known. I have played with it awhile ago and it works well for
some applications. Most likely it will do what you want. There are some minor copyright issues with it,
but, not important. I will download this code and see what I can find about the folder issues…

Sponsor our Newsletter | Privacy Policy | Terms of Service