Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. @off Pika, what is OP ? Sorry for this stupid question
  2. Before you send the script with php mail function, you have to gather all data to $header variable. Just re-structure your script, and I think everything will be fine
  3. This content comes from lines 10, 11 and 12. Check your if and else statements b/s comes out nothing from there. Break down your code line by line and you will find the error. PS. You must re-structure your script
  4. Ok, before php mail function, add this code and post out a result // add this echo '<pre>'.var_dump($headers).'</pre>'; exit; //before mail($to, $subject, "", $headers);
  5. No, only this on the line 9 or 10
  6. Delete this part of code ( on the top, line 9 or 10 ). $headers .= "--" . $uid . "\r\n";
  7. Where is the line 71?
  8. You've got a error here, too: $tnp_name = $_FILES['file_upload']['tnp_name']; to be $tnp_name = $_FILES['file_upload']['tmp_name'];
  9. Hey Doc20, immediately before -> $app_application = mysql_query("INSERT INTO applications ..... etc ), add this code and post out the result. echo '<pre>'.print_r($user_id, true).'</pre>'; $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link); echo '<pre>'.var_dump($result).'</pre>'; exit;
  10. I don't know, someone having more experience have to say..
  11. Okay, but when you called -> call sp_selectNewsArticles(1); Your query is gonna be : SELECT `id`, `newsTitle` FROM `tbl_newsArticles` ORDER BY 1 DESC b/s SELECT `id`, `newsTitle` FROM `tbl_newsArticles` ORDER BY fld DESC
  12. Ah, now I've got it, you don't have in table structure `fld`, right ? Your query it seems like this: SELECT `id`, `newsTitle` FROM `tbl_newsArticles` ORDER BY 1 DESC
  13. Try this: DELIMITER // DROP PROCEDURE IF EXISTS `sp_selectNewsArticles`; CREATE PROCEDURE `sp_selectNewsArticles`(IN `fld` VARCHAR(255)) BEGIN SELECT `id`, `newsTitle` FROM `tbl_newsArticles` WHERE `col_name` = `fld` ORDER BY fld DESC; END // DELIMITER ; P.S Just add a WHERE clause , I don't know your database structure
  14. Hm... I've never used column's name in this statement. I'm going to check in my database PS. By the way, did you check out my solution ?
  15. Yes, but your IN statement is wrong -> CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_selectNewsArticles`(IN fld VARCHAR(255)) must be CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_selectNewsArticles`(IN `tbl_name` VARCHAR(255))
  16. Okay, drop down your old stored procedure and create a new. You need to define a table_name, not column's name. Try this: DELIMITER // DROP PROCEDURE IF EXISTS `sp_selectNewsArticles`; CREATE PROCEDURE `sp_selectNewsArticles`(IN `tbl_newsArticles` VARCHAR(255)) BEGIN SELECT `id`, `newsTitle` FROM `tbl_newsArticles` ORDER BY fld DESC; END // DELIMITER ;
  17. @hassan, check this out -> http://php.net/manual/en/language.types.string.php $form = <<<EOD "<form method="post" action="signup-p.php" id="signupform"> <div class="form"> <div class="fieldset"> <input name="signup_form" type="hidden" /> <div class="input"> <label for="username">Username</label> <input type="text" name="user" id="username" value="" /> </div> <div class="input"> <label for="email">E-mail</label> <input type="text" name="email" id="email" value="" /> </div> <div class="input"> <label for="email_confirm">Confirm E-mail</label> <input type="text" name="email_confirm" id="email_confirm" value="" /> </div> <div class="input"> <label for="password">Password</label> <input type="password" name="password" id="password" /> </div> <div class="input"> <label for="password_confirm">Confirm password</label> <input type="password" name="password_confirm" id="password_confirm" /> </div> </div> <div class="button"><strong><input type="submit" class="submit" name="registerbtn" value="Sign up" /></strong></div> </div> </form>" EOD;
  18. Can you post out your procedure code ?
  19. This is wrong: define ("buypop","false"); to be define ("buypop",false);
  20. In this query -> $get_site_id = mysql_query ("SELECT * FROM ws_Lw9_user WHERE username = '$site_username'", $webspell_link), your link_identifier is $webspell_link! But....here -> $app_application = mysql_query("INSERT INTO applications (id, site_id, timestamp, name, c_name.........) etc.... your link_identifier is $recruit_link! Can you explain this ?
  21. Few months ago, I've written (with google's help ) a bash script to dump my databases. I have basic skills in Bash and I don't know how professional is it, but.... works for me #! /bin/bash # list of databases to be backed up separated by space DATABASES="NAME_OF_DB" DBUSER="DB_USER" DBPASS="DB_PASSWORD" DBSERVER="DB_SERVER" ASTERISKHOME=/keynote NOW=`/bin/date +%Y%m%d-%H%M` DIR=`pwd` NODATA= help_dump(){ echo "dump databases" echo " --help this info" echo " --no-data dump only the sql structure" } for i in $* do case $i in --no-data) NODATA="--no-data" ;; --cdr) CDR=1 ;; --help) help_dump exit ;; -h) help_dump exit ;; *) # unknown option #QUITE= echo "use the options --no-data and --destination" exit ;; esac done if [ ! -d $DIR/$NOW$NODATA ];then mkdir -p $DIR/$NOW$NODATA;fi if [ -n "$CDR" ];then /usr/bin/mysqldump --host=$DBSERVER --socket=$ASTERISKHOME/mysql/mysql.sock --user=$DBUSER --password=$DBPASS --routines $NODATA $CDRDATABSE > $DIR/$NOW$NODATA/$x$NODATA-$NOW.sql else for x in $DATABASES; do /usr/bin/mysqldump --host=$DBSERVER --socket=$ASTERISKHOME/mysql/mysql.sock --user=$DBUSER --password=$DBPASS --routines $NODATA --databases $x > $DIR/$NOW$NODATA/$x$NODATA-$NOW.sql done fi tar zcf db-$NOW$NODATA.tgz $NOW
  22. Your script works to me: Try this: $to = "tuparov86@gmail.com"; $email = 'jazzman@jazzman.ca'; $subject = 'Post message'; $message = ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: ".$email; if(mail($to,$subject,$message,$headers)){ echo 'Message sent'; exit; } else { echo "Error...."; exit; }
  23. Hehe, sorry about that I thought that Pic's suggest is: echo '$_POST array:<pre>'; print_r($app_application); echo '</pre>';
  24. Could you post out a piece of code?
×
×
  • 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.