
BradD
Members-
Posts
61 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
BradD's Achievements

Member (2/5)
0
Reputation
-
Is it possible to make an animation of this pic with values that can easily be changed therefore changing the animation??? [attachment deleted by admin]
-
Hey guys: I'm trying to get my head around a project that I'm thinking of undertaking, If I had a flash or 3d animation made to graphically illustrate how gas expands and becomes less soluble as pressure decreases "Basically an expanding bubble" Imagine a bubble of gas coming from the ocean floor at a depth of 10,000ft, the closer it gets to surface the more it expands. How would I go about fitting the graphic illustration with Analog gauge readings that constantly change as the bubble was exposed to less and less hydrostatic pressure as it got closer to the surface. The analog guage readings don't have to be fit to a specific formula they just need to show pressure going up or down. Can this be done by blending flash / 3d grapgics with php?
-
Don't ask me why ??? But I thought there was more to it than that...
-
Hey Pikachu: How goes it man: I thought you might be having the weekend off? Thanks man, your an absolute legend....
-
Hey Guys: I have been getting a massive amount of help with this script and now I am stuck again... The confirmation email is being sent BUT there is no link attached to it. So when it arrives in the inbox, it looks something like this. Dear bob, Thank you for registering at my website. To confirm your registration, please visit the link provided and enter the following confirmation code, 0d64f18da8955b90260d1c1349cd57b1 As you can see the URL is missing and I can't seem to find the appropriate information to hook the URL and $conf_code ? Any Suggestions? <?php ob_start(); ?> <?php require_once('connectDB.php'); $password = md5($_POST['password']); // hash the password before the array_map() array_map('mysql_real_escape_string', $_POST); // Since only one element won't need to be sanitized, run the entire $_POST array through mysql_real_escape_string. $conf_code = md5(uniqid(rand(), true)); // generates confirmation code to use wth the confirmation email that gets sent // $query = "INSERT INTO `members` ( `firstname`, `lastname`, `username`, `password`, `accounttype`, `country`, `state`, `city`, `phone`, `mobile`, `business`, `email`, `website`, `signupdate`, `emailactivated`, `confirmed` ) VALUES ( '" . $_POST['firstname'] . "', '" . $_POST['lastname'] . "', '" . $_POST['username'] . "', '" . $password . "', '" . $_POST['accounttype'] . "', '" . $_POST['country'] . "', '" . $_POST['state'] . "', '" . $_POST['city'] . "', '" . $_POST['phone'] . "', '" . $_POST['mobile'] . "', '" . $_POST['business'] . "', '" . $_POST['email'] . "', '" . $_POST['website'] . "', now(), '" . $conf_code . "', 0 )"; mysql_query($query) or die("There has been a system problem. Failed to add record to database."); if( mysql_affected_rows() == 1 ) { $id = mysql_insert_id(); $new_record = "SELECT `firstname`, `username`, `email`, `emailactivated` FROM `members` WHERE `id` = $id"; $result = mysql_query($new_record); $array = mysql_fetch_assoc($result); $email = $array['email']; $subject = "Your confirmation code from the website"; $message = "Dear " . $array['firstname'] . ",\r\n"; $message .= "Thank you for registering at my website. To confirm your registration, please visit the link provided and enter the following confirmation code,\r\n"; $message .= $array['emailactivated']; $from = "From: [email protected]\n"; if( mail($email, $subject, $message, $from) ) { header( 'Location: success.php' ); // redirects to a "landing page" if mail was sent successfully. exit; // stops further script execution after redirect. } } ?> <? ob_flush(); ?> Help is greatly appreciated.
-
OK this seems to fix it. At the top and bottom of the script you add <?php ob_start(); ?> <?php $your_script header ( 'Location: success.php') ?> <?php ob_flush(); ?> Output Buffer Start & Output Buffer Flush
-
Heres the code magnetica <?php require_once('connectDB.php'); $password = md5($_POST['password']); // hash the password before the array_map() array_map('mysql_real_escape_string', $_POST); // Since only one element won't need to be sanitized, run the entire $_POST array through mysql_real_escape_string. $conf_code = md5(uniqid(rand(), true)); // generates confirmation code to use wth the confirmation email that gets sent // $query = "INSERT INTO `members` ( `firstname`, `lastname`, `username`, `password`, `accounttype`, `country`, `state`, `city`, `phone`, `mobile`, `business`, `email`, `website`, `signupdate`, `emailactivated`, `confirmed` ) VALUES ( '" . $_POST['firstname'] . "', '" . $_POST['lastname'] . "', '" . $_POST['username'] . "', '" . $password . "', '" . $_POST['accounttype'] . "', '" . $_POST['country'] . "', '" . $_POST['state'] . "', '" . $_POST['city'] . "', '" . $_POST['phone'] . "', '" . $_POST['mobile'] . "', '" . $_POST['business'] . "', '" . $_POST['email'] . "', '" . $_POST['website'] . "', now(), '" . $conf_code . "', 0 )"; mysql_query($query) or die("There has been a system problem. Failed to add record to database."); if( mysql_affected_rows() == 1 ) { $id = mysql_insert_id(); $new_record = "SELECT `firstname`, `username`, `email`, `emailactivated` FROM `members` WHERE `id` = $id"; $result = mysql_query($new_record); $array = mysql_fetch_assoc($result); $email = $array['email']; $subject = "Your confirmation code from the website"; $message = "Dear " . $array['firstname'] . ",\r\n"; $message .= "Thank you for registering at my website. To confirm your registration, please visit the link provided and enter the following confirmation code,\r\n"; $message .= $array['emailactivated']; $from = "From: [email protected]\n"; if( mail($email, $subject, $message, $from) ) { header( 'Location: success.php' ); // redirects to a "landing page" if mail was sent successfully. exit; // stops further script execution after redirect. } } ?>
-
Imagine my surprise when google, yahoo, ask... have no documents with this message about header. Warning: Cannot modify header information - headers already sent by (output started at /home/database/public_html/db_insert.php:2) That's gunna make it hard to figure out, :wtf: Can anyone direct me to some info that will help me work out why I'm getting this Warning?
-
If I have 16 entries in my table and have( id PRIMARY AI ), (username UNIQUE), (email UNIQUE) SHOULD username hold the same Cardinal Value as id and email which are 16? It's just that the Cardinal value of username is 0 and I'm pretty sure it should also be 16 along with id and email.
-
Hey Guys; I can't figure out this error; Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in /home/database/public_html/db_insert.php on line 20 The Table is being Updated when the form is submitted but this error message is also... using the mysql_affected_rows() if( mysql_affected_rows($query) == 1 ) { $id = mysql_insert_id(); $new_record = "SELECT `firstname`, `username`, `email`, `emailactivated` FROM `members` WHERE `id` = $id"; $result = mysql_query($new_record); $array = mysql_fetch_assoc($result); Here's how I see it, blurry and probably wrong but... We are using the mysql_affected_rows function to discover whether data in the $query Variable has been recorded, then we are assigning a variable $new_record to the SELECT function, we then tell $new_record mysql_query that it is now $result and then we fetch this $result from the $array. That's probably the shortest possible explanation and probably wrong as well. Anyway I can't figure out whats causing this error? Because I'm pretty sure the link resource is okay. <?php require_once('connectDB.php'); $password = md5($_POST['password']); // hash the password before the array_map() array_map('mysql_real_escape_string', $_POST); // Since only one element won't need to be sanitized, run the entire $_POST array through mysql_real_escape_string. $conf_code = md5(uniqid(rand(), true)); // generates confirmation code to use wth the confirmation email that gets sent // $query = "INSERT INTO `members` ( `firstname`, `lastname`, `username`, `password`, `accounttype`, `country`, `state`, `city`, `phone`, `mobile`, `business`, `email`, `website`, `signupdate`, `emailactivated`, `confirmed` ) VALUES ( '" . $_POST['firstname'] . "', '" . $_POST['lastname'] . "', '" . $_POST['username'] . "', '" . $password . "', '" . $_POST['accounttype'] . "', '" . $_POST['country'] . "', '" . $_POST['state'] . "', '" . $_POST['city'] . "', '" . $_POST['phone'] . "', '" . $_POST['mobile'] . "', '" . $_POST['business'] . "', '" . $_POST['email'] . "', '" . $_POST['website'] . "', now(), '" . $conf_code . "', 0 )"; mysql_query($query) or die("There has been a system problem. Failed to add record to database."); if( mysql_affected_rows($query) == 1 ) { $id = mysql_insert_id(); $new_record = "SELECT `firstname`, `username`, `email`, `emailactivated` FROM `members` WHERE `id` = $id"; $result = mysql_query($new_record); $array = mysql_fetch_assoc($result); $email = $array['email']; $subject = "Your confirmation code from the website"; $message = "Dear " . $array['firstname'] . ",\r\n"; $message .= "Thank you for registering at my website. To confirm your registration, please visit the link provided and enter the following confirmation code,\r\n"; $message .= $array['emailactivated']; $from = "From: [email protected]\n"; if( mail($email, $subject, $message, $from) ) { header('Location: nuttin.php'); // redirects to a "landing page" if mail was sent successfully. exit(); // stops further script execution after redirect. } } ?>
-
Warning: mysql_real_escape_string() expects at least 1 parameter
BradD replied to BradD's topic in PHP Coding Help
Thanks Mchl: That got it sorted, -
Warning: mysql_real_escape_string() expects at least 1 parameter
BradD replied to BradD's topic in PHP Coding Help
Thanks Alex: That got it, DUH! Now I have another > There has been a system problem. Failed to add record to database. mysql_query($query) or die("There has been a system problem. Failed to add record to database."); -
Warning: mysql_real_escape_string() expects at least 1 parameter
BradD replied to BradD's topic in PHP Coding Help
I have a basic, basic jist of arrays after writing several different types today to help myself gain more understanding of them, but I'm just not getting this. Got any more clues?