Jump to content

coupe-r

Members
  • Posts

    328
  • Joined

  • Last visited

    Never

Everything posted by coupe-r

  1. Thank you very much for that, but how do I now pass in every var? Do I just do this? checkVars($var1, $var2, $var3, etc.....) PS - Thanks for using your first post on me
  2. Hey guys, OK, heres what I would like to do. On my form, I have 50+ variables and not all of them require a response. If inserted, they insert a blank in the DB, instead of NULL. First, does this even matter? If it does, how can I create a function that checks the var to see if its empty, and if empty $var = NULL; Thanks
  3. Try taking out your parenthese on the $row[] vars. and try this echo '<tr><td>'.$firstname.'</td><td>'.$email.'</td></tr>';
  4. $result = mysql_query("SELECT * FROM "TABLE" WHERE username = '".$_POST['username_txt']."'"); $row = mysql_fetch_array($result); echo $row['username']; username_txt = the name of the text box the user entered data into. username = the username column in the database
  5. Is this helpful? http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/using-php-to-backup-mysql-databases.aspx
  6. Hello everyone, I have a rental application form that gets submitted online and then inserted into the DB. I now want to allow users to pay the application fee online. My question is, what is the best process for this? Here is what I was thinking: Fill out the form --- Selecting Credit Card as the payment option --- Pressing the 'Submit' button --- Transferring them to Paypal to complete payment --- On successful payment, insert the application fields into the DB? Is there a better way of doing it? Since they are leaving my site temporarily, will my php variables for the application still be valid? I've never worked with Paypal IPN before, so any help would be great. (I would be willing to pay someone for this setup). Thanks
  7. $link = '<iframe style="overflow: hidden; border: 0; width: 400px; height: 300px" src="http://embed.novamov.com/embed.php?width=400&height=300&v=xngq7u8yejwbt" scrolling="no"></iframe>'; Pass $link into your insert statement.
  8. Sure.. Capture every piece of data you can on the user (IP Address, name, email, etc). Now you have 1 record. Lets say they try to register again. when they fill out your form again, check the field vars against the record in your DB, especially the IP address. Now, you can't just query again the name, because that is too common, you would need to do IP address, email, last name, or any other unique data you can pull. Now, this is not full proof because they can switch computers (different IP address), use a different email address, etc. You can ever ask for a phone number and query on that as well. I've never done something like this, but I would start here and continue to build out. Does this make sense?
  9. I'm not sure cookies or sessions come into place here. What you want is to not let the same person register more than once. The only thing you can do is log their IP, username, first / last name, email, and all the other goodies. Then, when someone registers, check the DB for ALL of that info to see if it matches. If it matches, reject.
  10. Thank you for taking the time to do that. I also found this: number_format($total, 2, '.', '') Would that do the same?
  11. Hello everything, I have the following code: while($row = mysql_fetch_array($result)) { $due[] = $row['amount']; $total[] = $row['amount']; } $due = array_sum($due); $total = array_sum($total); My current output is: $due = 23 $total = 100 What I would like is to have .00 at the end of each of those. If either of the variables above naturally have decimals, they appear fine, just when they are integers. Any help is appreciated.
  12. This has helped me but I have a question on how to re-direct from here. under my alert(), I have a header(Location). If I comment out the header(), the alert runs fine, otherwise it just runs the redirect. Is there a way that the alert will run and then when you press the OK button in the dialog box, the rest of the code below will run? Thanks as always.
  13. Yes, what he said. I forgot you wanted multiple rows.
  14. Do this: $result = mysql_query("SELECT search2 FROM search`WHERE search1 = '%".$search."%' "); $row = mysql_fetch_array($result); echo $row['search2'];
  15. Well, you should be posting a var like that. Do this: $name = $_POST['name_txt']; name_txt is the name of the text box where they enter their name. Then you can just echo $name;
  16. I saw fPDF.org as well, but it looks like that still creates a PDF of your page? Just need to map answers from my DB to my PDF, not make a PDF.
  17. Or maybe this: header('Location: webpage.php?id='.$variable);
  18. You are just quering the database and not grabbing any records. You need to grab the records with a mysql_fetch_array(); or any other fetch function. You can then echo them on the page. I don't see any echo statements or anywhere where you are trying to grab record data.
  19. Could this be it? $result = mysql_query("SELECT * FROM main WHERE id='". $_SESSION['id']."'") or die(mysql_error()); You don't have a WHERE clause in your query. You also dont have proper quotes in your query.
  20. I've never used .tml files, so I may not be any help. In your index.php file, do everything there, just to see if you can get anything to echo. That way we know if your getting results. We can then move to get the include to work.
  21. Can I ask why you are using a .tpl file?
×
×
  • 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.