Jump to content

divinedesigns1

Members
  • Posts

    1,200
  • Joined

  • Last visited

Everything posted by divinedesigns1

  1. heeeey im on my umm some number of project idk im lost, anyway, i need to create a 3D website "dymanic website" but im not sure how to start, the person wants it in flash flash is kool for the effects like sound on the button etc then php would be kool too, but the person needs it in flash cant i use some other thing but flash to make this? also how can i implement php into flash? i got a lot of questions so ill ask them two at a time
  2. i dont want to save it, it should just display it on the page how many time the site was/is visited
  3. hey sup guys, me again with another question, how can i make my own custom page counter, like the one i have up here www.targetincs.com "i dont like it" i can get it for free but it doesnt match up with the template theme, and i would like to either generate a custom one which i can make it the exact color and background, or read a tutorial on how to make one from start to finish in javascript "dont want it in php"
  4. shake my booty shake my booty shake my booty i got it working oooo yeaa shake shake what i did was take out the connection information from MyConnect.php or MiConnect.php and place it into the script itself and bammmmmmm no error,for some reason it wasnt reading the include_once file and realizing that the variable con was coming from there and not in the script itself, so by placing the variable and function into the script itself, it worked no error from the mysqli_real_escape_string() and the script works Thank you everyone
  5. the $con comes from this include_once function i think imma place that inside the script itself and see if that work instead, because this is the second time im having this exact errorinclude_once "MiConnect.php"; $query = mysqli_query($con, "INSERT INTO form (firstname, lastname, company, email, phone)VALUE('$firstname', '$lastname', '$company', '$email', '$mobile')") or die(mysqli_error($con));
  6. why is it a waste of time? its there for a reason
  7. <?php// php script for the form start here$errorMessage = "";$firstname = "";$lastname = "";$company = "";$email = "";$mobile = "";if($_POST['firstname']){// Grab variables$firstname = $_POST['firstname'];$lastname = $_POST['lastname'];$company = $_POST['company'];$email = $_POST['email'];$mobile = $_POST['phone'];// Making sure variables are present else stop processif(!$firstname || !$lastname || !$company || !$email || !$mobile){ $errorMessage = 'The Form is incomplete, or you forgot a Field(s). Please Fill all Fields';}else{ // Run any filtering here $firstname = ereg_replace("[^A-Za-z0-9]", "", $_POST['firstname']); $firstname = strip_tags($firstname); $firstname = stripslashes($firstname); $lastname = ereg_replace("[^A-Za-z0-9]", "", $_POST['lastname']); $lastname = strip_tags($lastname); $lastname = stripslashes($lastname); $company = ereg_replace("[^A-Za-z0-9]", "", $_POST['company']); $company = strip_tags($company); $company = stripslashes($company); $email = strip_tags($email); $email = stripslashes($email); $mobile = strip_tags($mobile); $mobile = stripslashes($mobile); $mobile = ereg_replace("[^0-9]", "", $_POST['phone']); $firstname = mysqli_real_escape_string($con, $firstname); $lastname = mysqli_real_escape_string($con, $lastname); $company = mysqli_real_escape_string($con, $company); $email = mysqli_real_escape_string($con, $email); $mobile = mysqli_real_escape_string($con, $mobile); $to = 'smith@smithy.net'; $from = '$firstname ' . ' $lastname'; $subject = 'Fill2Win Promo'; // Email Message Bot $message = " $firstname $lastname $company $email $mobile "; // Configure some headers $header = 'MIME-Version:1.0' . "rn"; $header .= 'Content-type:textrn'; $header .= 'From: $from' . "/r" . "/n"; // mail form include_once "MiConnect.php"; $query = mysqli_query($con, "INSERT INTO form (firstname, lastname, company, email, phone) VALUE('$firstname', '$lastname', '$company', '$email', '$mobile')") or die(mysqli_error($con)); $errorMessage = 'Thank You for your message'; $firstname = ""; $lastname = ""; $company = ""; $email = ""; $mobile = ""; $result = mysqli_query($con, $query);} // lock this condition} // lock if POST a condition?>
  8. ok i did that and it just said connect error: didnt state what the error is or if its an error
  9. yea i am connecting to the database, since the form is inserting the information into the database, thats where im puzzled
  10. i did what you said and i got this errorNULL string(23) "smith@smithy.n"Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in /home/content/14/8709614/html/formtodata/promo.php on line 41 stating that the string 23 is smith@smithy.n which suppose to be smith@smithy.net
  11. yes $con is the variable i use to descript my database connect, like this $dbhost ="";$dbuser = "";$dbpass = "";$dbname = "";$con = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die ('connection error');
  12. so my code is correcti put $email = mysqli_real_escape_string($con, $email); or should $email be replaced with $str?
  13. i try using the mysqli_real_escape_string() on the mobile and email and i end up with these errors ^ the above error shows my email and a fake phone number, but im not too sure how to fix this, i used the var_dump() function to see whats wrong on like 40 and 41, now im not sure how to fix it can someone give me a hand please
  14. its actually working atm check it out www.divinedesigns1.com/formtodata/promo.php but i still need to add more security to it which im not sure how to do also is it possible to make the form send the information to the data and to an email?
  15. ok thanks, now i need to fine out what cron jobs are
  16. divinedesigns1

    auto export

    hello, how everyone? ok i know how to export the data from mysql to excel manually "btw thesci in phpmyadmin you can export xls files from there now, i just found out and though i let you know" but i dont want to be doing that every week, so i was wondering how i can export it automatically so that all i have to do is take the file out of the ftp and hand it over "still that's too much work, but for now thats the plan" how can i do this?
  17. ok, so i did what you guys said to do, excuted the query, i evaluate the fields, and that work, but it didnt insert the data into mysql
  18. and ok so called, ill try that and see what happen
  19. <input name="firstname" type="text" id="firstname" size="32" maxlength="28" value=" <?php echo $fname; ?> " />you have told to evaluate the values here. yes and i did, fine the variable for firstname is $fname, so on and so on, that part works fine, since i tested it.
  20. hey im having this problem and not sure how to fix it, been at it for a few hours now, and still nothing, ok so when you fill out the form "this form www.divinedesigns1.com/formtodata/promo.php" and after you hit the submit button the form doesnt clear the fields this is my code <?phpinclude_once ("MyConnect.php");$errorMessage = "";$fname = "";$lname = "";$company = "";$email = "";$mobile = "";if($_POST['firstname']){// Grab variables$fname = $_POST['firstname'];$lname = $_POST['lastname'];$company = $_POST['company'];$email = $_POST['email'];$mobile = $_POST['phone'];// Making sure variables are present else stop processif(!$fname || !$lname || !$company || !$email || !$mobile){ $errorMessage = 'The Form is incomplete, or you forgot a Field. Please Fill all Fields';}else{ // Run any filtering here $fname = strip_tags($fname); $fname = stripslashes($fname); $lname = strip_tags($lname); $lname = stripslashes($lname); $company = strip_tags($company); $company = stripslashes($company); $email = strip_tags($email); $email = stripslashes($email); $mobile = strip_tags($mobile); $mobile = stripslashes($mobile); $to = 'aismith@smithai.ai'; $from = '$fname' . '$lname'; $subject = 'Fill2Win Promo'; // Email Message Bot $message = " $fname $lname $company $email $mobile "; // Configure some headers $header = 'MIME-Version:1.0' . "rn"; $header .= 'Content-type:textrn'; $header .= 'From: $fromrn'; // Inserting data $query = "INSERT INTO form (first_name, last_name, email, phone, company_name)" . "VALUE('$fname', '$lname', '$company', '$email', '$mobile')" or die('problem querying');} // lock this condition} // lock if POST a condition?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Promo</title></head><body><form id="form1" name="form1" method="post" action="promo.php"><div id="effect"><?php echo $errorMessage; ?></div><br /><br />First Name: <br /><input name="firstname" type="text" id="firstname" size="32" maxlength="28" value="<?php echo $fname; ?>" /><br />Last Name: <br /><input name="lastname" type="text" id="lastname" size="32" maxlength="28" value="<?php echo $lname; ?>" /><br />Company Name: <br /><input name="company" type="text" id="company" size="32" maxlength="28" value="<?php echo $company; ?>" /><br />Email: <br /><input name="email" type="email" id="email" size="32" maxlength="28" value="<?php echo $email; ?>" /><br />Mobile: <br /><input name="phone" type="number" id="phone" size="32" maxlength="28" value="<?php echo $mobile; ?>" /><br /><input name="submit" type="submit" id="submit" value="submit" /></form></body></html> am i making a error? or have a misspelled word?
  21. so that code works, its something to do with wamp i have on my desktop, now its time to add the security and whats not to it thanks guys
×
×
  • Create New...