Jump to content

partha

Members
  • Posts

    12
  • Joined

  • Last visited

partha's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi Friends,I have designed a registration page. Once finished the registration process, it has redirected to index.php.We are using Windows XP and IE 6.0. Some systems it works perfectly. Some systems it will not work. It shows blank screen. i.e., header ("location:index.php"); exit(); statements will not executed. I have displayed some statements before and after the redirection statement. That statements are excuted perfectly.I hope, u will help me to solve this problem.Thanks and regards,T.R.Parthasarathy
  2. Hi,Thanks for ur reply.I hosted my website in yahoo.I do not know, how to contact them.I have one issue, yahoo designed by php. When i attach a file, it allows 10MB files only and at the same time, they spilited files in 5.Can u help to solve it.Thanks and regards.T.R.Parthasarathy
  3. Hi,I can upload 2MB file only in php.Shall i upload more than 2MB file.I have changed the file size in local php.ini.I do not know, how to change in server.I hope, friends will help.Thanks and regards.T.R.Parthasarathy
  4. Hi,Thanks,I am using PHP. I have used backslash, forward slash, and * + and so many.But, I did not any +ve results.Can u help me by sending correct code.Thanks and regards,T.R.Parthasarathy.
  5. partha

    problem in mail

    Sender address is an input from the user.For example, I am using example.com. If the user enters From address like one@example.com, I receive the mail and from address is one@example.com.At the same time, if I use some other dome name, one@asd.com, I receive the mail from webmaster@example.comThis is my problem. My dear friends, I hope you will reply for it.Thanks and regards,T.R.Parthasarathy
  6. I am using PHP. I have referred so many sites and i have tried it. But, i did not get the result.
  7. Hai Friends,I want to get some input from user. It may be more than one word.In eregi(), i am not able to accept the white space.if (!eregi("^[(0-9a-z_)]+[(0-9a-z)]$", $name)){ echo ("Invalid");}I have tried, /s*, /s+ and many more. But, no use.I hope, friends can help me.Thanks and regards,T.R.Parthasarathy
  8. Sender address is an input from the user.I am using example.com. If the user enters From address like one@example.com, I receive the mail and from address is one@example.com.At the same time, if I use some other dome name, one@asd.com, I receive the mail from webmaster@example.comThis is my problem. My dear friends, I hope you will reply for it.Thanks and regards,T.R.Parthasarathy//-------------------------------------------------------------------------------------------------<!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=iso-8859-1" /><title>Untitled Document</title></head><body> <?php// mail function spamcheck($field) {//eregi() performs a case insensitive regular expression match if(eregi("to:",$field) || eregi("cc:",$field)) return TRUE; else return FALSE; }$error="";if(isset($_POST[s1])){ $tfname = $_REQUEST['txtfname']; $tlname = $_REQUEST['txtlname']; $temail = $_REQUEST['txtemail']; $tptit = $_REQUEST['txtptit']; $tqual = $_REQUEST['selcou']; $tpdes = $_REQUEST['txtapdes']; $tadd = $_REQUEST['txtadd']; $tphone = $_REQUEST['txtpho']; // First Name if (!eregi("^[(0-9a-z_)]+[(0-9a-z)]$", $tfname)) { $error .= "First Name "; } // Last Name if (!eregi("^[(0-9a-z_)]+[(0-9a-z)]$", $tlname)) { $error .= "Last Name "; }/* // Qualification if (!eregi("^[0-9a-z_]+[0-9a-z]$", $tlname)) { $error .= "Qualification "; }*//* White space \s* matches 0 or more spaces \s+ matches 1 or more spaces*/ // Email if (!eregi("^[a-z]+[ _\.0-9a-z_]+[0-9a-z]+@([0-9a-z][0-9a-z._]+\.)+[a-z]{2,4}$", $temail)) { $error .="Email Address "; } // Project Title if (!eregi("^[(0-9a-z_)\s*]+[(0-9a-z)]$", $tptit)) { $error .= "Project Title "; }/* // Project Desecription if (!eregi("^[0-9a-z]$", $tpdes)) { $error .= "Project Description "; } // Address if (!eregi("^[0-9a-z]$", $tadd)) { $error .= "Address "; }*//* // Phone if (!eregi("^[0-9]$", $tphone)) { $error .= "Phone Number "; }*/ if ($error == "") {// check zip or rar file type if (($_FILES["file"]["type"] == "application/x-zip-compressed") || ($_FILES["file"]["type"] == "application/octet-stream")) { if ($_FILES["file"]["error"] > 0) { $error .= "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $pro='/x1x2x1x2/'; $uploadDir = $pro; if($_POST) { $fileName = $_FILES['file']['name']; $tmpName = $_FILES['file']['tmp_name']; $fileSize = $_FILES['file']['size']; $fileType = $_FILES['file']['type']; $filePath = $uploadDir . $fileName; echo ($filePath); // get the file extension first $ext = substr(strrchr($fileName, "."), 1); // echo ("<br>" . $ext); // make the random file name $randName = md5(rand() * time());// echo ("<br>" . $randName . "<br>"); $imag=$randName.'.' . $ext;// echo ($imag); // and now we have the unique file name for the upload file $filePath = $uploadDir . $randName . '.' . $ext;// echo ("<br>File Path : ".$filePath."<br>"); $result = move_uploaded_file($tmpName, $filePath); chmod($filePath,0777);// echo ("uploaded successfully <a href=".$filePath.">".$filePath."</a>"); } } }//if "email" is filled out, send email if (isset($_REQUEST['txtemail'])) { //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['txtemail']); if ($mailcheck==TRUE) { echo "Invalid input"; } else { //send email $fname = $_REQUEST['txtfname']; $lname = $_REQUEST['txtlname']; $quali = $_REQUEST['selcou']; $email = $_REQUEST['txtemail']; $subject = $_REQUEST['txtptit'] ; $pdes = $_REQUEST['txtapdes']; $files = $_REQUEST['file']; $add = $_REQUEST['txtadd']; $pho = $_REQUEST['txtpho']; $filename = $_FILES[file]['name']; $headers = 'From: ' .$email ."\r\n"; $headers = 'MIME-Version: 1.0' . "\r \n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . phpversion(); //mail($to, $subject, $message, $headers); $message = '<html><body><table border=1 align=center width=700><tr><td><table border=0 align=center width=100%> <tr><td colspan=2 bgcolor=#003399 align=center><font name=arial color=white size=20pt align=center>'.$subject.'</font></td></tr> <tr><td>Name </td><td>'.$fname . ' '. $lname .'</td></tr> <tr><td>Email</td><td>'.$email.'</td></tr> <tr><td>Numbers </td><td>'.$quali.'</td></tr> <tr><td>Description</td><td>'.$pdes.'</td></tr> <tr><td>Attachment </td><td><a href=// http://www.example.com'.$filePath...></tr> <tr><td>Address</td><td>'.$add. '<br> Phone : '.$pho.'</td></tr> <tr><td colspan=2> <a href="login.php">Login</a> </td></tr> </table></td></tr></table></body></html>'; // $message = htmlentities($message1, ENT_COMPAT, 'ISO-8859-1'); mail("example@example.com", $subject, $message, $headers);// echo "<br>Thank you for using our mail form";// header("location:index.html");// exit(); } } } else { $error .= "Invalid "; }}?><form method='post' action='cmail.php' enctype='multipart/form-data'> <table width="450" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF" valign="top"> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>FName </span></td> <td align="left" valign="top"><div align="left"> <input name='txtfname' type='text' class='txtclr' id='txtfname' size='30' maxlength='50' value="<?=$_REQUEST['txtfname']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>LName </span></td> <td align="left" valign="top"><div align="left"> <input name='txtlname' type='text' class='txtclr' id='txtlname' size='30' maxlength='50' value="<?=$_REQUEST['txtlname']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Numbers </span></td> <td align="left" valign="top"><div align="left"><span class='style11'> <select name="selcou" class='txtclr'> <option selected="selected"> <?=$_REQUEST['selcou']?> </option> <!-- <option selected=selected>Courses</option> --> <option selected="selected">One</option> <option>Two</option> <option>Three</option> </select> </span></div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Email </span></td> <td align="left" valign="top"><div align="left"> <input name='txtemail' type='text' class='txtclr' id='txtemail' size='30' maxlength='50' value="<?=$_REQUEST['txtemail']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Text </span></td> <td align="left" valign="top"><div align="left"> <input name='txtptit' type='text' class='txtclr' id='txtptit' size='30' maxlength='100' value="<?=$_REQUEST['txtptit']?>" /> </div></td> </tr> <tr> <td align='left' valign="top" class='lblclr'><span class='style19'>Description </span></td> <td align="left" valign="top"><div align="left"><span class='style11'> <textarea name='txtapdes' cols='35' rows='5' class='txtclr'><?=$_REQUEST['txtapdes']?> </textarea> </span></div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Upload file and < 2 MB </span></td> <td align="left" valign="top"><div align="left"> <input name='file' type='file' class='txtclr' id='file' size='30' /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Address </span></td> <td align="left" valign="top"><div align="left"> <input name='txtadd' type='text' class='txtclr' id='txtadd' size='30' maxlength='150' value="<?=$_REQUEST['txtadd']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Phone </span></td> <td align="left" valign="top"><div align="left"> <input name='txtpho' type='text' class='txtclr' id='txtpho' size='30' maxlength='10' value="<?=$_REQUEST['txtpho']?>" /> </div></td> </tr> <tr> <td colspan="2"><div align='center'><span class='style1'> <?=$error?> </span></div></td> </tr> <tr> <td align="center"> </td> <td align="center"><div align='left'><span class='style11'> <input name='s1' type='submit' class='heading' value='Submit Form'/> <input name="r1" type="reset" class="heading" id="r1" value="Clear Form" /> </span></div></td> </tr> </table> </form></body></html>
  9. partha

    problem in mail

    <!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=iso-8859-1" /><title>Untitled Document</title></head><body> <?php// mail function spamcheck($field) {//eregi() performs a case insensitive regular expression match if(eregi("to:",$field) || eregi("cc:",$field)) return TRUE; else return FALSE; }$error="";if(isset($_POST[s1])){ $tfname = $_REQUEST['txtfname']; $tlname = $_REQUEST['txtlname']; $temail = $_REQUEST['txtemail']; $tptit = $_REQUEST['txtptit']; $tqual = $_REQUEST['selcou']; $tpdes = $_REQUEST['txtapdes']; $tadd = $_REQUEST['txtadd']; $tphone = $_REQUEST['txtpho']; // First Name if (!eregi("^[(0-9a-z_)]+[(0-9a-z)]$", $tfname)) { $error .= "First Name "; } // Last Name if (!eregi("^[(0-9a-z_)]+[(0-9a-z)]$", $tlname)) { $error .= "Last Name "; }/* // Qualification if (!eregi("^[0-9a-z_]+[0-9a-z]$", $tlname)) { $error .= "Qualification "; }*//* White space \s* matches 0 or more spaces \s+ matches 1 or more spaces*/ // Email if (!eregi("^[a-z]+[ _\.0-9a-z_]+[0-9a-z]+@([0-9a-z][0-9a-z._]+\.)+[a-z]{2,4}$", $temail)) { $error .="Email Address "; } // Project Title if (!eregi("^[(0-9a-z_)\s*]+[(0-9a-z)]$", $tptit)) { $error .= "Project Title "; }/* // Project Desecription if (!eregi("^[0-9a-z]$", $tpdes)) { $error .= "Project Description "; } // Address if (!eregi("^[0-9a-z]$", $tadd)) { $error .= "Address "; }*//* // Phone if (!eregi("^[0-9]$", $tphone)) { $error .= "Phone Number "; }*/ if ($error == "") {// check zip or rar file type if (($_FILES["file"]["type"] == "application/x-zip-compressed") || ($_FILES["file"]["type"] == "application/octet-stream")) { if ($_FILES["file"]["error"] > 0) { $error .= "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $pro='/x1x2x1x2/'; $uploadDir = $pro; if($_POST) { $fileName = $_FILES['file']['name']; $tmpName = $_FILES['file']['tmp_name']; $fileSize = $_FILES['file']['size']; $fileType = $_FILES['file']['type']; $filePath = $uploadDir . $fileName; echo ($filePath); // get the file extension first $ext = substr(strrchr($fileName, "."), 1); // echo ("<br>" . $ext); // make the random file name $randName = md5(rand() * time());// echo ("<br>" . $randName . "<br>"); $imag=$randName.'.' . $ext;// echo ($imag); // and now we have the unique file name for the upload file $filePath = $uploadDir . $randName . '.' . $ext;// echo ("<br>File Path : ".$filePath."<br>"); $result = move_uploaded_file($tmpName, $filePath); chmod($filePath,0777);// echo ("uploaded successfully <a href=".$filePath.">".$filePath."</a>"); } } }//if "email" is filled out, send email if (isset($_REQUEST['txtemail'])) { //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['txtemail']); if ($mailcheck==TRUE) { echo "Invalid input"; } else { //send email $fname = $_REQUEST['txtfname']; $lname = $_REQUEST['txtlname']; $quali = $_REQUEST['selcou']; $email = $_REQUEST['txtemail']; $subject = $_REQUEST['txtptit'] ; $pdes = $_REQUEST['txtapdes']; $files = $_REQUEST['file']; $add = $_REQUEST['txtadd']; $pho = $_REQUEST['txtpho']; $filename = $_FILES[file]['name']; $headers = 'From: ' .$email ."\r\n"; $headers = 'MIME-Version: 1.0' . "\r \n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . phpversion(); //mail($to, $subject, $message, $headers); $message = '<html><body><table border=1 align=center width=700><tr><td><table border=0 align=center width=100%> <tr><td colspan=2 bgcolor=#003399 align=center><font name=arial color=white size=20pt align=center>'.$subject.'</font></td></tr> <tr><td>Name </td><td>'.$fname . ' '. $lname .'</td></tr> <tr><td>Email</td><td>'.$email.'</td></tr> <tr><td>Numbers </td><td>'.$quali.'</td></tr> <tr><td>Description</td><td>'.$pdes.'</td></tr> <tr><td>Attachment </td><td><a href=// http://www.example.com'.$filePath...></tr> <tr><td>Address</td><td>'.$add. '<br> Phone : '.$pho.'</td></tr> <tr><td colspan=2> <a href="login.php">Login</a> </td></tr> </table></td></tr></table></body></html>'; // $message = htmlentities($message1, ENT_COMPAT, 'ISO-8859-1'); mail("example@example.com", $subject, $message, $headers);// echo "<br>Thank you for using our mail form";// header("location:index.html");// exit(); } } } else { $error .= "Invalid "; }}?><form method='post' action='cmail.php' enctype='multipart/form-data'> <table width="450" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF" valign="top"> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>FName </span></td> <td align="left" valign="top"><div align="left"> <input name='txtfname' type='text' class='txtclr' id='txtfname' size='30' maxlength='50' value="<?=$_REQUEST['txtfname']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>LName </span></td> <td align="left" valign="top"><div align="left"> <input name='txtlname' type='text' class='txtclr' id='txtlname' size='30' maxlength='50' value="<?=$_REQUEST['txtlname']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Numbers </span></td> <td align="left" valign="top"><div align="left"><span class='style11'> <select name="selcou" class='txtclr'> <option selected="selected"> <?=$_REQUEST['selcou']?> </option> <!-- <option selected=selected>Courses</option> --> <option selected="selected">One</option> <option>Two</option> <option>Three</option> </select> </span></div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Email </span></td> <td align="left" valign="top"><div align="left"> <input name='txtemail' type='text' class='txtclr' id='txtemail' size='30' maxlength='50' value="<?=$_REQUEST['txtemail']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Text </span></td> <td align="left" valign="top"><div align="left"> <input name='txtptit' type='text' class='txtclr' id='txtptit' size='30' maxlength='100' value="<?=$_REQUEST['txtptit']?>" /> </div></td> </tr> <tr> <td align='left' valign="top" class='lblclr'><span class='style19'>Description </span></td> <td align="left" valign="top"><div align="left"><span class='style11'> <textarea name='txtapdes' cols='35' rows='5' class='txtclr'><?=$_REQUEST['txtapdes']?> </textarea> </span></div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Upload file and < 2 MB </span></td> <td align="left" valign="top"><div align="left"> <input name='file' type='file' class='txtclr' id='file' size='30' /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Address </span></td> <td align="left" valign="top"><div align="left"> <input name='txtadd' type='text' class='txtclr' id='txtadd' size='30' maxlength='150' value="<?=$_REQUEST['txtadd']?>" /> </div></td> </tr> <tr> <td align='left' valign='top' class='lblclr'><span class='style19'>Phone </span></td> <td align="left" valign="top"><div align="left"> <input name='txtpho' type='text' class='txtclr' id='txtpho' size='30' maxlength='10' value="<?=$_REQUEST['txtpho']?>" /> </div></td> </tr> <tr> <td colspan="2"><div align='center'><span class='style1'> <?=$error?> </span></div></td> </tr> <tr> <td align="center"> </td> <td align="center"><div align='left'><span class='style11'> <input name='s1' type='submit' class='heading' value='Submit Form'/> <input name="r1" type="reset" class="heading" id="r1" value="Clear Form" /> </span></div></td> </tr> </table> </form></body></html>
  10. Hi Friends, I am a fresher to php. I have designed one website using php + mysql. In this website, the search result page is displayed perfectly sometimes. And sometimes, it displays blank screen. Not only in my system, i have checked in many systems. I have same problem in all systems. Anyone can help me to solve this problem. I am using sessions for userID.If it displays blank screen at all times, i can do something. But, it is different. I do not know, why it is displaying the result page like that.my website address is www.seriooh.comIt is very urgent. Please friends, i hope u will reply for it.Thanks T.R.Parthasarathy
  11. <html><body><?phpfunction spamcheck($field) {//eregi() performs a case insensitive regular expression match if(eregi("to:",$field) || eregi("cc:",$field)) { return TRUE; } else { return FALSE; } }//if "email" is filled out, send emailif (isset($_REQUEST['email'])) { //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==TRUE) { echo "Invalid input"; } else { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = "<table border=1><tr><td>" . $_REQUEST['message'] . "</td></tr></table>"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_POST] <$email>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail("partha@cachegroups.com", "Subject: $subject", $message, "From: $email" ); echo "Thank you for using our mail form"; } }else//if "email" is not filled out, display the form { echo "<form method='post' action='testemail.php'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' /> </form>"; }?></body></html>
×
×
  • Create New...