jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
Yep, post the html form the problem is inside the input email field.
-
No, according to the log that you provided me above the problem is not there. Have you ever sent the message from this particular web hosting? Why this string is 18 characters long string(18) "CJA@blah.org"? Did you try to replace that e-mail address?
-
I used only this part of the script: $message = "Hello " . $fname . ", <p> Below is a request for volunteer exercise participants. Follow the instructions accordingly, as they will all differ. Please direct any questions you have to the contact listed below.</p> <center> <p><font color='green'><b>If you volunteer for this event, PLEASE inform the Contact listed below that you heard about this opportunity through the Participant Database!!!</b></font></p> </center> <p>------------------- MESSAGE FOLLOWS --------------------</p> <p><b> Contact Name: </b>" . $cname . " <br><b> Contact E-mail: </b>" . $email . " <br><b> Contact Telephone: </b>" . $tele . " </p> <p>" . $info . "</p>"; $subject = "Call for Participants - EXERCISE REQUEST"; $headers = 'From: '. $cname .' <'. $email .'>' . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $response = mail('hunna03@gmail.com',$subject,$message,$headers); if($response) {echo "Your Message Has Been Sent!<br>";} As I said before, the mail script works just fine, you have to check what's going on before this part of the script. PS. If you want to check everything just post the html form
-
Done, I sent it from my local server..... check in the spam folder.
-
Ok, I am going to send you the same message from my remote server to this e-mail: CJA@blah.org. Give me few minutes. Is it a real email address?
-
Everything is just fine. Are you trying to send that message from a local server or a remote one?
-
It sounds like a romanian language
-
Ok, between $headers and $response put the line below, submit the form and give me the result back, $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; echo var_dump($to, $subject,$message,$headers); exit; $response = mail('dtuparov@gmail.com',$subject,$message,$headers);
-
Hm..... can you explain us what is that? <p><font color='red' size='2'>You are receiving this message because you have previously signed up to do so. If you would no longer like to be an exercise participant volunteer, click <a href='http://www.blah.com/participate/yes.php?id=" . $id . "&email=" . $to . "'> here</a> to remove yourself.</font></p>
-
The script works, I've tested it from my local server. Check what result do you get from $to = $row['email']; Results:
-
Well, I cannot see the value of the $to variable. Where is it?
-
How to download a pdf and mp3 file stored in mysql
jazzman1 replied to Jaswinder's topic in MySQL Help
Wrong using mysql_num_rows function. Take a look - http://php.net/manual/en/function.mysql-num-rows.php Change: EDIT: Don't call every time mysql_connection in every php script, just use the include php function for good design. $n=mysql_num_rows; to $n=mysql_num_rows(Sql); -
I've never seen before someone to have a problem with execution script time on the local server. I have a problem with that to godaddy, they limit my php script up to 150 sec, so even I created my own php.ini file and the values (master and local) are changed to 300 sec nothing happened. I asked them few times about this issue and nobody knows the answer
-
This is my script that I wrote a month ago for one bulgarian guy to dump 3 databases and 3 directories from his local web server and send data to the remote machine using the vsFTP. You can use the same logic to achieve your task: #!/bin/bash # MYSQL DATABASE Login info DBUSER=jazzman DBHOST=localhost DBPASS=password DBNAMES="invoicr test blog" MYSQLDUMP="$(which mysqldump)" # WEB SERVER Directories WBNAMES="/var/www/html/invoicr /var/www/html/test/ /var/www/html/blog/" # File archives function, Date function, Current directory of the script TAR="$(which tar)" NOW=`/bin/date +%Y%m%d` DIR=$(dirname $0) # FTP SERVER Login info HOST='192.168.1.105' #This is the FTP servers host or IP address. USER=dummy #This is the FTP user that has access to the server. PASSWD=password #This is the password for the FTP user. if [ ! -d $DIR/$NOW ];then mkdir -p $DIR/$NOW;fi ${MYSQLDUMP} --host=$DBHOST --user=$DBUSER --password=$DBPASS --protocol=TCP --port=3306 --single-transaction --databases ${DBNAMES} > $DIR/$NOW/$NOW.sql ${TAR} zcf ${DIR}/db\-$NOW.tgz ${DIR}/${NOW}/$NOW.sql ${WBNAMES} FILE=${DIR}/db\-$NOW.tgz ftp -ivn $HOST <<FTP_SCRIPT quote USER ${USER} quote PASS ${PASSWD} cd Desktop put ${FILE} quit FTP_SCRIPT # remove the new directory rm -rf ${DIR}/${NOW} # remove the archive file rm -rf ${FILE} Results: Connected to 192.168.1.105 (192.168.1.105). 220 (vsFTPd 2.2.2) 331 Please specify the password. 230 Login successful. 250 Directory successfully changed. local: ./db-20130305.tgz remote: ./db-20130305.tgz 227 Entering Passive Mode (192,168,1,105,130,139). 150 Ok to send data. 226 Transfer complete. 92489086 bytes sent in 1.97 secs (46997.32 Kbytes/sec) 221 Goodbye. If you want to send a binary data using a sFTP you have to add a binary word to the ftp script. ftp -ivn $HOST <<FTP_SCRIPT quote USER ${USER} quote PASS ${PASSWD} binary cd Desktop put ${FILE} quit FTP_SCRIPT
-
Hm....scp uses the same authentication and level of security as ssh for data transfer, in other words there is no way to provide a password in your bash script and to get the data from the remote server. The best way for me that I know and use to log in without asking any password authentication is to install a trusty certificate between the machine A (client) and the machine B (server), see that - http://www.linuxproblem.org/art_9.html. If both servers are share hosting, probably you don't have any permission to install it, you could be use a "Secure File Transfer Protocol" , vsFTP under linux is a good alternative.
-
Where do you declare this $id: if(isset($_GET[$id])){ ...........
-
Try, $idQuery = mysql_query(" SELECT * FROM `content` WHERE 'id'=$pageid LIMIT 0 , 20"); to $idQuery = mysql_query(" SELECT * FROM `content` WHERE `id`=$pageid LIMIT 0 , 20");
-
Do you have a ssh access to both servers or only ftp?
-
Need help fetching an array with a static method
jazzman1 replied to eldan88's topic in PHP Coding Help
Every public method in the class could be calling without instantiation. Example: <?php class Area { public function calculate_area($length, $bredth) { return $length * $bredth; } } $result=Area::calculate_area(225, 75); echo "The area is: $result"; Results: -
If you are looking to find a job as a programmer I know at least two companies in Bulgaria seeking php programmers. http://nau4i.me/forum/index.php/topic,15237.0.html http://nau4i.me/forum/index.php/topic,15036.0.html
-
The easiest way to make this is to use a mysql proper date format in the date column. SELECT `Total` FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 7 DAY) <= `Date` OREDER BY `ID` DESC;
-
<?php $sql=mysql_query("SELECT*FROM videos WHERE User='$nemo'"); $name = array(); while($row=mysql_fetch_array($sql,MYSQL_ASSOC)){ $name[]=$row['Name']; } // you can use a loop to find all indexes in that array // example echo '<div id="found"><h1>'.$name[0].'</div></h1>'; echo '<div id="found"><h1>'.$name[1].'</div></h1>'; ?>