Jump to content

coldfiretech

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

coldfiretech's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks, i took out the extra ) from the javascript. But that didnt fix the error. It is still kicking me the same error! Any idea's?
  2. I am protecting the software, you wont be able to open it without user/pass but i still want to put the files in a protected directory.
  3. Hello everyone I am testing some php scripts locally using WAMP. I am getting this error Here is the code from handlesignups <SCRIPT language="JavaScript"> function submitform() { document.paypal.submit(); ) window.onload=submitform; } </SCRIPT> <?php include("classes/signup.class.php"); $signup = new signup(); if (isset($_POST['signupbt'])) { // SET PRICE FOR SUBSCRIPTIONS if($_POST['subscription'] == 'single') { $price = '00.01'; } elseif($_POST['subscription'] == 'partner') { $price = '00.01'; } elseif($_POST['subscription'] == 'family') { $price = '00.01'; } $show_form = false; //PAYPAL BUTTON $paypalbutton = " <form name=\"paypal\"action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> <input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\"> <img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\"> <input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\"> <input type=\"hidden\" name=\"business\" value=\"*********\"> <input type=\"hidden\" name=\"item_name\" value=\"".$_POST['login']."\"> <input type=\"hidden\" name=\"item_number\" value=\"".$_POST['subscription']."\"> <input type=\"hidden\" name=\"no_shipping\" value=\"1\"> <input type=\"hidden\" name=\"no_note\" value=\"1\"> <input type=\"hidden\" name=\"currency_code\" value=\"USD\"> <input type=\"hidden\" name=\"lc\" value=\"US\"> <input type=\"hidden\" name=\"bn\" value=\"PP-SubscriptionsBF\"> <input type=\"hidden\" name=\"a3\" value=\"".$price."\"> <input type=\"hidden\" name=\"p3\" value=\"1\"> <input type=\"hidden\" name=\"t3\" value=\"M\"> <input type=\"hidden\" name=\"src\" value=\"1\"> <input type=\"hidden\" name=\"sra\" value=\"1\"> </form>";?> <? if($signup->required_field($_POST['email']) == false) { echo "You must enter an email"; $show_form = true; } elseif ($signup->check_email($_POST['email']) == true) { echo "This email address is already registered in our system <br />"; $show_form = true; } elseif ($signup->check_login_exist($_POST['login']) == true) { echo "This username already exists in our system.. please select another one <br />"; $show_form = true; } elseif($_POST['subscription'] == 'single') { $price = '00.01'; $signup->create_subscription_a (); echo "You are now registered in our system. Please pay your subscription fee."; ?><br /> <? } elseif($_POST['subscription'] == 'partner') { $price = '00.01'; $signup->create_subscription_b (); echo "You are now registered in our system. Please pay your subscription fee."; ?><br /> <? } elseif($_POST['subscription'] == 'family') { $price = '00.01'; $signup->create_subscription_c (); echo "You are now registered in our system. Please pay your subscription fee."; ?><br /> <?php #THIS IS THE LINE THROWING THE ERROR } if($show_form == false) { echo $paypalbutton; } } ?> <script>document.paypal.submit();</script>
  4. I am trying make a password protected directory i can put a zip file in. and then have a download link to that file on a php page. Basically, I am trying to sell some software of mine, and want the files to be in a password protected directory so people have to pay before they can get access to the page to download the files.. Any advice on how to go about this would be greatly appreciated! Thanks.
  5. coldfiretech [Cold Fire Technology LLC]  Is the name of the business that my friend and i recently started. In a book that i have read it talks about the flame of life, a cold flame, a blue flame. Most people who dont have a spiritual side to them probably wont understand it so..i dont really know what else to say ;)
  6. could you show me an example? -n00bie thanks!
  7. Trying to figure how i would go about detecting if someone was trying to view my phone from a blackberry device. That way i can redirect them to a different page that was more suiteable for blackberrry viewing? Anyone know how this is to be done please let me know! -Matt
  8. stupid thing!!! its working now... for no aparent reason ???
  9. Okay that worked! Everything except one field!! I have a function called csStates which is like this made the function so i can easily reuse in drop downs without having an extra 50lines of code print " <option value='Alabama'>Alabama</option> <option value='Alaska'>Alaska</option> <option value='Arizona'>Arizona</option> <option value='Arkansas'>Arkansas</option> <option value='California'>California</option>" //ect..... and this is where my actual drop down that calls the csstates function <td class='style20'><strong>State: <span class='green style35'>*</span></strong></td> <td><span id='validselState'> <select name='state' id='state' tabindex='2'> <option selected='selected'></option>"; Im still getting the undefined index on the State field.... here is the line from the class file $this->state = mysql_real_escape_string($_POST['state']); Anyone????
  10. Okay so im starting to figure this out a little bit.. When i try to define my inputs it keeps giving me an undefined index error on all my variables. Too many to post in here so ill kept it short. registerclass.php <?php #class used to process a user registration class register_process{ #variable decleration var $login = ""; var $password = ""; var $email = ""; var $fname = ""; var $mname = ""; var $lname = ""; #sets object's variable from defined POST inputs on the form. function define_inputs(){ $this->login = mysql_real_escape_string($_POST['login']); $this->email = mysql_real_escape_string($_POST['email']); $this->fname = mysql_real_escape_string($_POST['fname']); $this->mname = mysql_real_escape_string($_POST['mname']); $this->lname = mysql_real_escape_string($_POST['lname']); } function check_email(){ #verification user's entered addres is not already in the database as the email address is the user's login username $q = "Select Email from `users` Where Email = '".$this->email."'"; $r = mysql_query($q) or die(mysql_error()."<br /><br />".$q); if(mysql_num_rows($r) >0){ RETURN 0; }else{ RETURN 1;} } } index.php (using this as a test page..) <html> <title>testing class files</title> <?php include("registerclass.php");?> <body> <?php error_reporting(E_ALL); $con = mysql_connect("localhost", "stacks", "island67"); mysql_select_db("cellsavior", $con); $register = new register_process(); //here you're passing $mysqli object to $csx object, so that it could use database connection. $register->define_inputs(); if ($register->check_email() > 0){ //good to go echo "good to go"; }else{ echo "no goood"; } ?> </body> </html>
  11. Okay so here is what i have come up with... Cant get it to work... Dont know what im doing wrong... Its giving me this error index.php <?php error_reporting(E_ALL); $csx = new csx_functions($mysqli); //here you're passing $mysqli object to $csx object, so that it could use database connection. $result = $csx->check_email("coldfiretech@yahoo.com"); if ($result > 0) { //username is good to use echo "no good"; }else{ //username is no good echo "good"; } ?> testclass.php <?php error_reporting(E_ALL); define("csx_host", "localhost"); define("csx_user", "matt); define("csx_pass", "*****); define("csx_db", "mydb"); $mysqli = new mysqli(csx_host, csx_user, csx_pass, csx_db); class csx_functions { protected $_db; function __construct($mysqli) { $this->_db = $mysqli; } public function check_email($email) { $query = "SELECT `email` from users WHERE email = '$email'"; $r = $this->db->query($query); if(mysqli_num_rows($r) >0){ RETURN 0; }else{ RETURN 1; } } } ?>
  12. Hello, i am kinda new to database's and whatnot so im looking for some help / guidance. Im going to need like 7 tables due to the amount of fields for each section. I am trying figure how to make the id number relational across all tables. For instance the users id, login and password and email and whatnot will be stored in the users table. their id, first middle and last names and more will be in the personal table, their id, cellphone, homephone, and workphone will be stored in the contact table... and so forth... Ive got mysql admin and phpmyadmin installed so i should be ready to go. I have read a little bit about relational databases and understood most of it but im kinda stumped as to how i am really supposed to do this. Anyone???
×
×
  • 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.