Jump to content

TheBrandon

Members
  • Posts

    72
  • Joined

  • Last visited

    Never

Everything posted by TheBrandon

  1. Anything you recommend specifically? If I change it to Bcc it still spits out in the body. Is there any way to fix it without re-writing the entire email portion? I'll be happy to follow any tutorials you recommend for sure but is it possible to make this work this way, or does it have to be rewritten to do the mime thing?
  2. Hello all, I need to send out mass HTML emails to a list of people in a BCC list. Right now I have everything working except the BCC part. It seems to do nothing. Here is my code: $email_array = getEmailAddresses($dbHost, $dbUser, $dbPass, $dbDatabase); $email_array = implode(", ", $email_array); $subject = 'Subject'; $headers = "From: ".$to."\n"; $headers .='Content-type: text/html; charset=iso-8859-1 '. "\r\n"; $headers .= 'BCC: '.$email_array.'' . "\r\n"; mail($to, $subject, " <html> <head> <title>Title</title> <style> table {background-color:white;border:1px solid black;padding:5px;} table tr {padding:10px;border:1px solid black;background-color:white;} table tr td {padding:5px;border:1px solid black;} table tr.odd {background-color:#e2e1df;} </style> </head> <body> <table> <tr> <td><p>Please see below for a new announcement.</p></td> </tr> <tr> <td>".$announcement_content."</td> </tr> </table> </body> " , $headers); } Can anyone help me get this to work? Right now if you run that code, it is putting the list of BCC emails in the body of the email; not even in the headers.
  3. I contacted my host. They said it seems to be a security glitch on their server. I'll keep you guys updated. It hasn't been fixed yet.
  4. The paypal data shouldn't be being accessed until after you confirm your order, no. That's step 3; my script is breaking on 2.
  5. Will do. Any ideas on why it's creating the error? Actually when I put it on a new domain, it created a 403 error; not a 404.
  6. I moved it to another domain name thinking maybe it was a conflict with some .htaccess or something. Same result. Spits this out: Forbidden You don't have permission to access /cart/checkout.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I don't get it. Why is accessing step=2 generating a 404 error on the first try?
  7. Yeah. Same result. I even tried putting the absolute path with the full URL.
  8. No. See comments below. It says: if $_GET['step'] is NOT set OR IF $_GET['step'] DOES NOT EQUAL 2. So "if its anything but 2 and is set" Line 2 : Check if step is defined and the value is two // two=2 if (!defined('WEB_ROOT') //if $_GET['step'] is NOT set OR IF $_GET['step'] DOES NOT EQUAL 2 || !isset($_GET['step']) || (int)$_GET['step'] != 2 || $_SERVER['HTTP_REFERER'] != 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?step=1') { // 1 ???? exit; }
  9. Yeah but step is defined. Is it written improperly?
  10. The onSubmit is just form validation. function checkShippingAndPaymentInfo() { with (window.document.frmCheckout) { if (isEmpty(txtShippingFirstName, 'Enter first name')) { return false; } else if (isEmpty(txtShippingLastName, 'Enter last name')) { return false; } else if (isEmpty(txtShippingAddress1, 'Enter shipping address')) { return false; } else if (isEmpty(txtShippingPhone, 'Enter phone number')) { return false; } else if (isEmpty(txtShippingState, 'Enter shipping address state')) { return false; } else if (isEmpty(txtShippingCity, 'Enter shipping address city')) { return false; } else if (isEmpty(txtShippingPostalCode, 'Enter the shipping address postal/zip code')) { return false; } else if (isEmpty(txtPaymentFirstName, 'Enter first name')) { return false; } else if (isEmpty(txtPaymentLastName, 'Enter last name')) { return false; } else if (isEmpty(txtPaymentAddress1, 'Enter Payment address')) { return false; } else if (isEmpty(txtPaymentPhone, 'Enter phone number')) { return false; } else if (isEmpty(txtPaymentState, 'Enter Payment address state')) { return false; } else if (isEmpty(txtPaymentCity, 'Enter Payment address city')) { return false; } else if (isEmpty(txtPaymentPostalCode, 'Enter the Payment address postal/zip code')) { return false; } else { return true; } } }
  11. It seems okay to me, that's one reason I'm asking for help. Do you see something wrong? <form action="?step=2" method="post" name="frmCheckout" id="frmCheckout" onSubmit="return checkShippingAndPaymentInfo();"> <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable"> <tr class="entryTableHeader"> <td colspan="2">Shipping Information</td> </tr> <tr> <td width="150" class="label">First Name</td> <td class="content"><input name="txtShippingFirstName" type="text" class="box" id="txtShippingFirstName" size="30" maxlength="50"></td> </tr> <tr> <td width="150" class="label">Last Name</td> <td class="content"><input name="txtShippingLastName" type="text" class="box" id="txtShippingLastName" size="30" maxlength="50"></td> </tr> <tr> <td width="150" class="label">Address1</td> <td class="content"><input name="txtShippingAddress1" type="text" class="box" id="txtShippingAddress1" size="50" maxlength="100"></td> </tr> <tr> <td width="150" class="label">Address2</td> <td class="content"><input name="txtShippingAddress2" type="text" class="box" id="txtShippingAddress2" size="50" maxlength="100"></td> </tr> <tr> <td width="150" class="label">Phone Number</td> <td class="content"><input name="txtShippingPhone" type="text" class="box" id="txtShippingPhone" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">Province / State</td> <td class="content"><input name="txtShippingState" type="text" class="box" id="txtShippingState" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">City</td> <td class="content"><input name="txtShippingCity" type="text" class="box" id="txtShippingCity" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">Postal / Zip Code</td> <td class="content"><input name="txtShippingPostalCode" type="text" class="box" id="txtShippingPostalCode" size="10" maxlength="10"></td> </tr> </table> <p> </p> <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable"> <tr class="entryTableHeader"> <td width="150">Payment Information</td> <td><span style="float:left;"><input type="checkbox" name="chkSame" id="chkSame" value="checkbox" onClick="setPaymentInfo(this.checked);"> </span> <label for="chkSame" style="cursor:pointer">Same as shipping information</label></td> </tr> <tr> <td width="150" class="label">First Name</td> <td class="content"><input name="txtPaymentFirstName" type="text" class="box" id="txtPaymentFirstName" size="30" maxlength="50"></td> </tr> <tr> <td width="150" class="label">Last Name</td> <td class="content"><input name="txtPaymentLastName" type="text" class="box" id="txtPaymentLastName" size="30" maxlength="50"></td> </tr> <tr> <td width="150" class="label">Address1</td> <td class="content"><input name="txtPaymentAddress1" type="text" class="box" id="txtPaymentAddress1" size="50" maxlength="100"></td> </tr> <tr> <td width="150" class="label">Address2</td> <td class="content"><input name="txtPaymentAddress2" type="text" class="box" id="txtPaymentAddress2" size="50" maxlength="100"></td> </tr> <tr> <td width="150" class="label">Phone Number</td> <td class="content"><input name="txtPaymentPhone" type="text" class="box" id="txtPaymentPhone" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">Province / State</td> <td class="content"><input name="txtPaymentState" type="text" class="box" id="txtPaymentState" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">City</td> <td class="content"><input name="txtPaymentCity" type="text" class="box" id="txtPaymentCity" size="30" maxlength="32"></td> </tr> <tr> <td width="150" class="label">Postal / Zip Code</td> <td class="content"><input name="txtPaymentPostalCode" type="text" class="box" id="txtPaymentPostalCode" size="10" maxlength="10"></td> </tr> </table> <p> </p> <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable"> <tr> <td width="150" class="entryTableHeader">Payment Method </td> <td class="content"> <input name="optPayment" type="radio" id="optPaypal" value="paypal" checked="checked" /> <label for="optPaypal" style="cursor:pointer">Paypal</label></td> </tr> </table> <p> </p> <p align="center"> <input class="box" name="btnStep1" type="submit" id="btnStep1" value="Proceed >>"> </p> </form>
  12. I either get the source code for a 404 error page or the right page with missing form data. What do you mean?
  13. When I tried that, it had the same result. =/
  14. Hello all, I'm working on a shopping cart based on the plaincart tutorial here: http://www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php However I am having a strange problem that I've never encountered before. If you add a product to your cart and hit "Go To Checkout" and then "Checkout," enter your info and hit Submit, the page posts to itself but generates a 404 error. If you hit refresh on your browser on this screen, the page will then load but without the posted data. Does anyone have any idea how to fix this? Why is it generating a 404 error? I'm attaching the zip of the cart files. I was really hoping to get this online tomorrow so any help would be greatly appreciated. [attachment deleted by admin]
  15. Hello all, I'm about to try a project a bit beyond applications I've made before and I'm trying to expand and understand the process for writing a big application with a ton of functionality. I've gone through all of the actions and tried to condense them down as best as I can and plan as best as I can. However before I start writing code... I'm curious if this is a case for OOP programming? I have read a lot on OOP programming (and watched the tutorial stickied in this forum) but I still don't fully grasp its practical application outside of reusable code. I currently have a few classes I wrote and use (mostly for form validation or database connectivity) but I am having trouble learning the difference in something like form validation and having OOP handle "objects" like a user. Right now I have 3 huge "parts" of the website: users, projects and a forum. It's for managing projects at a company I work for. So for example the users section; register, forgot password, check access level, if they are an admin, etc. should there be a user class that contains all of this code? In what way is this better than simply having a users_functions.php file with all of the functions pertaining to users in it? Has anyone ever written a user class I could look at to see if I get it? Or should this simply be procedural? What questions should a programmer ask themselves when deciding between procedural or OOP?
  16. Got it. It was this part: //path we want the files stored in $target_path = "uploads/$id/"; //begin counter $i = 0; $files = array(); //begin loop while($i < 3){ //make sure each array key has valid data if(!is_null($_FILES['uploadedfile']['name'][$i])){ //append path to filenames in array $target_path = $target_path . basename( $_FILES['uploadedfile']['name'][$i]); //upload files if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'][$i], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name'][$i]). " has been uploaded"; $files[$i] = 'uploads/'.$id.'/'.$_FILES['uploadedfile']['name'][$i]; } //if file upload failed }else{ echo "There was an error uploading the file, please try again!"; } $i++; } The $target_path variable was being overwritten on the first execution of the loop so any subsequent files were breaking. Changing it to this fixed it: //path we want the files stored in $target_path = "uploads/$id/"; //begin counter $i = 0; $files = array(); //begin loop while($i < 3){ //make sure each array key has valid data if(!is_null($_FILES['uploadedfile']['name'][$i])){ //append path to filenames in array $target_path_link = $target_path . basename( $_FILES['uploadedfile']['name'][$i]); //upload files if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'][$i], $target_path_link)) { echo "The file ". basename( $_FILES['uploadedfile']['name'][$i]). " has been uploaded"; $files[$i] = 'uploads/'.$id.'/'.$_FILES['uploadedfile']['name'][$i]; } //if file upload failed }else{ echo "There was an error uploading the file, please try again!"; } $i++; }
  17. No one has any ideas?
  18. Hello everyone, I'm writing a script that allows a user to upload multiple attachments to an email from PHP. So far, everything seems to be working except the multiple attachments part. If I upload one file, it works. If I upload 2, it's messing up the file names so the files don't exist. So if I upload a.jpg, it works. If I upload a.jpg and b.jpg, b.jpg gets named a b.jpg. Can someone help me understand why this is happening and how to fix it? I'm almost certain its happening on my while loop around lune 72, but the more I look at the syntax the more it looks okay to me. I had it appending the path to the file names (so a.jpg become uploads/a.jpg) so I commented that out in hopes that was causing the error but it didn't fix it. Below is the full script. <?php /******************************************* /* contact_us_process.php /* Author: Brandon Pence ([email protected]) /* /* Desc: This page process and checks the submitted form. /* /* variable meaning /* -------- ------- /* $FieldCheck Instance of the FieldCheck class. /* /******************************************/ //start session session_start(); //include files require ("./inc/include.inc.php"); //include Field Check Class include("classes/FieldCheck.php"); //instantiate fieldcheck class $FieldCheck = new FieldCheck; extract($_POST); /*****DEBUG*********/ echo '<h1>POST ARRAY:</h1>'; print_r($_POST); echo '<hr/>'; echo '<h1>DATAFILE:</h1>'; print_r($datafile); echo 'foreach: <hr/>'; echo '<h1>FILES ARRAY:</h1>'; print_r($_FILES); echo '<hr/>'; echo 'File name test: '.$_FILES['uploadedfile']['name']['0'].'<br/>'; echo 'File name test: '.$_FILES['uploadedfile']['name']['1'].'<br/>'; echo 'File name test: '.$_FILES['uploadedfile']['name']['2'].'<br/>'; /********************/ //foreach($datafile as $key=>$value){ //echo 'Datafile: '.$datafile.' || Key: '.$key.' || Value: '.$value.'<br/>'; //$value = $id.'/'.$value; //echo 'Datafile: '.$datafile.' || Key: '.$key.' || Value: '.$value.'<br/>'; //} if(file_exists("uploads/$id")){ echo 'Folder Exists!'; }else{ echo 'Folder does not exist. Create folder.'; //create directory mkdir("uploads/$id",0777,true); } //path we want the files stored in $target_path = "uploads/$id/"; //begin counter $i = 0; $files = array(); //begin loop while($i < 3){ //make sure each array key has valid data if(!is_null($_FILES['uploadedfile']['name'][$i])){ //append path to filenames in array //$target_path = $target_path . basename($_FILES['uploadedfile']['name'][$i]); //upload files if(move_uploaded_file($_FILES['uploadedfile']['name'][$i], $target_path)) { echo "The file ". basename($_FILES['uploadedfile']['name'][$i]). " has been uploaded"; $files[$i] = 'uploads/'.$id.'/'.$_FILES['uploadedfile']['name'][$i]; } //if file upload failed }else{ echo "There was an error uploading the file, please try again!"; } $i++; } //validate input if (!$FieldCheck->checkName($your_name)){ $errors['your_name'] = "Your name is not valid.";} if (!$FieldCheck->isEmpty($your_date)){ $errors['your_date'] = "Your date is not valid.";} if (!$FieldCheck->isEmpty($your_message)){ $errors['your_message'] = "Your message is not valid.";} foreach($_POST as $key=>$value){ $fields[$key] = $value; } //print_r($_POST); //check for error messages if (isset($errors)) { $_SESSION['errors'] = $errors; $_SESSION['fields'] = $fields; $_SESSION['error_msg'] = "Errors found! Please review your entries."; $url = "./testimonials.php?action=errors"; header ("Location: $url"); exit; }else{ echo '$files ARRAY:'; print_r($files); // email fields: to, from, subject, and so on $to = "[email protected]"; $from = "[email protected]"; $subject ="Testing Script"; $message = "My message"; $headers = "From: $from"; // boundary $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // headers for attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // multipart boundary $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; $message .= "--{$mime_boundary}\n"; // preparing attachments for($x=0;$x<count($files);$x++){ $file = fopen($files[$x],"rb"); $data = fread($file,filesize($files[$x])); fclose($file); $data = chunk_split(base64_encode($data)); $message .= "Content-Type: {\"application/octet-stream\"};\n" . " name=\"$files[$x]\"\n" . "Content-Disposition: attachment;\n" . " filename=\"$files[$x]\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; $message .= "--{$mime_boundary}\n"; } // send $ok = @mail($to, $subject, $message, $headers); if ($ok) { echo "<p>mail sent to $to!</p>"; } else { echo "<p>mail could not be sent!</p>"; } echo 'EMAIL SENT!'; } ?>
  19. Gotta love it and hate it at the same time when it's something so simple... Thanks!
  20. Hello all, I am working on an upload script for a client. The script generates a random 32 bit string (to use as an ID). I want it to check if that folder exists and, if not, create it and put the files in it. Here is the script I have so far: <?php /******************************************* /* contact_us_process.php /* Author: Brandon Pence ([email protected]) /* /* Desc: This page process and checks the submitted form. /* /* variable meaning /* -------- ------- /* $FieldCheck Instance of the FieldCheck class. /* /******************************************/ session_start(); require ("./inc/include.inc.php"); //include Field Check Class include("classes/FieldCheck.php"); $FieldCheck = new FieldCheck; if(file_exists("uploads/$id")){ echo 'Folder Exists!'; }else{ echo 'Folder does not exist. Create folder.'; } //mkdir("uploads/$id",0777,true); $target_path = "uploads/$id/"; $i = 0; while($i < 3){ $target_path = $target_path . basename( $_FILES['uploadedfile']['name'][$i]); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'][$i], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name'][$i]). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } $i++; } if (!$FieldCheck->checkName($your_name)){ $errors['your_name'] = "Your name is not valid.";} if (!$FieldCheck->isEmpty($your_date)){ $errors['your_date'] = "Your date is not valid.";} if (!$FieldCheck->isEmpty($your_message)){ $errors['your_message'] = "Your message is not valid.";} foreach($_POST as $key=>$value){ $fields[$key] = $value; } //print_r($_POST); //check for error messages if (isset($errors)) { $_SESSION['errors'] = $errors; $_SESSION['fields'] = $fields; $_SESSION['error_msg'] = "Errors found! Please review your entries."; $url = "./testimonials.php?action=errors"; header ("Location: $url"); exit; }else{ // multiple recipients $to = '[email protected]'; // note the comma // subject $subject = '[Domain Name.com] Testimonials Form Submission'; // message $message = ' Name: '.$your_name.' Date: '.$your_date.' Message: '.$your_message.' '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Example <[email protected]>' . "\r\n"; $headers .= 'From: Example <[email protected]>' . "\r\n"; $headers .= 'X-MAILER: PHP'.phpversion(); $headers .= 'Reply-To:[email protected]'; // Mail it $mail = mail($to, $subject, $message); //mail("$to", "$subject", "this is a test message, if you are reading this the email was sent successfully."); //savvy $_SESSION['error_msg'] = "Your email has been sent. Thank you for contacting us."; header( "Location: testimonials.php?action=success" ); } ?> It always outputs folder exists, even though it doesn't. My form is this: function random_string($p_length) { $char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $char_list .= "abcdefghijklmnopqrstuvwxyz"; $char_list .= "1234567890"; $random = ""; srand((double) microtime() * 1000000); for($i = 0; $i < $p_length; $i++) { $random .= substr($char_list, (rand() % (strlen($char_list))), 1); } return $random; } <form method="POST" action="contact_us_process.php" class="cmxform" enctype="multipart/form-data"> <?php if ($_GET['action'] == 'success' && isset($_SESSION['error_msg'])){ echo '<div class="success">'.$_SESSION['error_msg'].'</div>'; unset($_SESSION['error_msg']); }else{ if(isset($_SESSION['error_msg'])){ echo '<div class="error">'.$_SESSION['error_msg'].'</div>'; unset($_SESSION['error_msg']); } } ?> <fieldset style="margin:20px;width:350px;height:450px;background-color:none;"> <legend>Contact Us</legend> <ol> <li> <label for="your_name">Your Name</label> <input type="text" name="your_name" size="50" class="textbox" <?php if (isset($errors['your_name'])){echo 'class="input_red"';}?> <?php if (isset($fields['your_name'])){echo 'value="'.$fields['your_name'].'"';}?>/> <?php if (isset($errors['your_name'])){ echo '<span class="error_box"> '.$errors['your_name'].'<span class="error-pointer"> </span></span>';}else{?> <span class="hint">Tell us your name! It's nice to meet you!<span class="hint-pointer"> </span></span> <?php } ?> </li> <div class="clear"></div> <li> <label for="your_date">Your Date</label> <input type="text" name="your_date" size="50" class="textbox" <?php if (isset($errors['your_date'])){echo 'class="input_red"';}?> <?php if (isset($fields['your_date'])){echo 'value="'.$fields['your_date'].'"';}?>/> <?php if (isset($errors['your_date'])){ echo '<span class="error_box"> '.$errors['your_date'].'<span class="error-pointer"> </span></span>';}else{?> <span class="hint">Let's keep in touch!<span class="hint-pointer"> </span></span> <?php } ?> </li> <div class="clear"></div> <li> <label for="your_message">Your Message</label> <textarea rows="3" cols="40" name="your_message" class="textarea"<?php if (isset($errors['your_message'])){echo 'class="input_red"';}?>><?php if (isset($fields['your_message'])){echo $fields['your_message'].'</textarea>';}else{echo '</textarea>';}?> <?php if (isset($errors['your_message'])){ echo '<span class="error_box"> '.$errors['your_message'].'<span class="error-pointer"> </span></span>';}else{?> <span class="hint">What's on your mind?<span class="hint-pointer"> </span></span> <?php } ?> </li> <li> <input name="uploadedfile[]" type="file" /> </li> <li> <input name="uploadedfile[]" type="file" /> </li> <li> <input name="uploadedfile[]" type="file" /> </li> <?php $random_string = random_string(32); //This will return a random 10 character string?> <input type="hidden" value="<?php echo $random_string;?>" name="id"/> <input type="hidden" name="MAX_FILE_SIZE" value="10000000" /> <div class="submit_box"> <input type="submit" value="Get in touch with us!" name="submit" class="submit"> </div> </ol> </fieldset> </form> Can anyone help me with the "if it exists, move on, if it doesnt, create folder" part?
  21. I have though. I plugged the same connection info into a PHP script and now I've got PHP doing it. So all the variables were right. I had it in the cron job at one point but it still broke it. Was my syntax wrong? I dunno. I've got PHP handling it now. It's just retarded that basic things like this are complicated or impossible on Godaddy.
  22. So I got into the office this morning and had an email from Godaddy telling me that, on Godaddy servers, you cannot run cron scripts that do backups. Here is the email: For anyone curious, this is the file he uploaded: <? function containsInfo($value){ if( isset($value) && ($value != '') ) return true; else return false; } if( containsInfo($_REQUEST['server']) && containsInfo($_REQUEST['database']) && containsInfo($_REQUEST['username']) && containsInfo($_REQUEST['password']) ){ if( mysql_connect(trim($_REQUEST['server']), trim($_REQUEST['username']), trim($_REQUEST['password'])) ){ $backupFile="MySQLExport.sql"; $sqlfile=$_SERVER['DOCUMENT_ROOT']."/".$backupFile; system("/usr/bin/mysqldump --opt -u" . trim($_REQUEST['username']) . " -p" . trim($_REQUEST['password']) . " -h" . trim($_REQUEST['server']) . " " . trim($_REQUEST['database']) . " > $sqlfile"); echo "The MySQL export has been created to your account. The file <a href='http://" . $_SERVER['HTTP_HOST'] . "/" . $backupFile . "'>" . $backupFile . "</a> was created in your root directory."; } } else{ ?> This tool is intended to create a MySQL export of your database. Simply fill in the following boxes with the MySQL settings specified on your hosting control panel and it will take care of the rest.<br/><br/> <form action="<?=$_SERVER['PHP_SELF'];?>" method="post"> <table border="1" cellpadding="3"> <tr> <td> Server Location: </td> <td> <input type="text" name="server"> </td> </tr> <tr> <td> Database Name: </td> <td> <input type="text" name="database"> </td> </tr> <tr> <td> Username: </td> <td> <input type="text" name="username"> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" name="password"> </td> </tr> <tr> <td colspan="2"> <input type="submit" value="Start Database Dump"> </td> </tr> </table> </form> <? } ?> So from here I'll either try to modify this to run without having data in the form or just find a PHP script to export and save a backup. It's just frustrating. I wish Godaddy would have told me this on my first email. It's annoying that it took so many emails to get a simple "you can't do that."
  23. I'll contact them again but I have. Twice. In fact they pointed me to post on a forum online... I'll email them the link to this thread though. I'll let you know how it goes.
  24. Just tried that (with the correct hostname of course) and I got this: mysqldump: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2) mysqldump: Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file mysqldump: Got error: 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client when trying to connect
  25. Well my first example had the host name: mysqldump --opt -Q -h [host] --user=[user] --password=[password] [database] | gzip -v9 - > [/home/content/a/l/m/almo10000/html/casting-call-db/_DailyBackups/MySQL-`/bin/date +\%a`.sql.gz] Unless something else was wrong with that code? Pikachu, can you post one of your godaddy crons?
×
×
  • 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.