Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Today at 2:23 PM
Ad icon
Wechat qr verification
Pawan2005
Updated:
Today at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Yesterday at 5:34 PM
Pure VPN - Up to 27 Months
vgp
Updated:
Friday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Jun 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
Help Needed (Urgent)
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="cm2004cm4ever" data-source="post: 7752377" data-attributes="member: 120594"><p>machan hema input ekakma submit karanna tharam code liyanna nam check karanna welawak na. eth basic widihata input 2k withara dala liyannam</p><p></p><p><?php</p><p>$input1 = strip_tags(trim(ucwords($_POST['element_1_1'])));</p><p>$input2 = strip_tags(trim(ucwords($_POST['element_1_2'])));</p><p>$email = strip_tags(trim($_POST['element_4']));</p><p>// your inputs</p><p>$submit = $_POST('submit');</p><p></p><p>function vEmail($email) { // verifying email address </p><p> if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) {</p><p> return false;</p><p> }</p><p> $email_array = explode("@", $email);</p><p> $local_array = explode(".", $email_array[0]);</p><p> for ($i = 0; $i < sizeof($local_array); $i++) {</p><p> if</p><p>(!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&</p><p>?'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$",</p><p>$local_array[$i])) {</p><p> return false;</p><p> }</p><p> }</p><p> if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) {</p><p> $domain_array = explode(".", $email_array[1]);</p><p> if (sizeof($domain_array) < 2) {</p><p> return false;</p><p> }</p><p> for ($i = 0; $i < sizeof($domain_array); $i++) {</p><p> if</p><p>(!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|</p><p>?([A-Za-z0-9]+))$",</p><p>$domain_array[$i])) {</p><p> return false;</p><p> }</p><p> }</p><p> }</p><p> return true;</p><p>}</p><p></p><p>if($submit){ //this form will submit after clicking button otherwise it'll show else part</p><p> if($input1&&$input2){ // checking for blank inputs, add all input fields here with &&</p><p> if(vEmail($email)){</p><p> // initializing mail</p><p> $yEmail = "yourusername@yourdomain.com";</p><p> $fName = "Name: ".$input1;</p><p> $org = "Organization: ".$input2;</p><p> $uEmail = "Email: ".$email;</p><p> $to = $yEmail;</p><p> $subject = "Your subject";</p><p> $headers = 'MIME-Version: 1.0' . "\r\n";</p><p> $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";</p><p> $headers = "From: <a href="mailto:valid@valid.com">valid@valid.com</a>";</p><p> $body = "$fName\n$org\n$uEmail";</p><p> mail($to,$subject,$body,$headers); // sending email</p><p> }</p><p> else{</p><p> echo "invalid email address";</p><p> }</p><p> }</p><p> else{</p><p> echo "please fill in all the blanks";</p><p> }</p><p>}</p><p>else{</p><p> "You don't have permission to stay here";</p><p>}</p><p></p><p>// warning messages should be like this</p><p>echo "<div style=\"width:200px; height:20px; border:1px solid #FF3030; padding:5px; background-color:#FFD7D7; color:#B62828\">Message to display</div>\n";</p><p>?></p></blockquote><p></p>
[QUOTE="cm2004cm4ever, post: 7752377, member: 120594"] machan hema input ekakma submit karanna tharam code liyanna nam check karanna welawak na. eth basic widihata input 2k withara dala liyannam <?php $input1 = strip_tags(trim(ucwords($_POST['element_1_1']))); $input2 = strip_tags(trim(ucwords($_POST['element_1_2']))); $email = strip_tags(trim($_POST['element_4'])); // your inputs $submit = $_POST('submit'); function vEmail($email) { // verifying email address if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { return false; } $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%& ?'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])| ?([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } if($submit){ //this form will submit after clicking button otherwise it'll show else part if($input1&&$input2){ // checking for blank inputs, add all input fields here with && if(vEmail($email)){ // initializing mail $yEmail = "yourusername@yourdomain.com"; $fName = "Name: ".$input1; $org = "Organization: ".$input2; $uEmail = "Email: ".$email; $to = $yEmail; $subject = "Your subject"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers = "From: [email]valid@valid.com[/email]"; $body = "$fName\n$org\n$uEmail"; mail($to,$subject,$body,$headers); // sending email } else{ echo "invalid email address"; } } else{ echo "please fill in all the blanks"; } } else{ "You don't have permission to stay here"; } // warning messages should be like this echo "<div style=\"width:200px; height:20px; border:1px solid #FF3030; padding:5px; background-color:#FFD7D7; color:#B62828\">Message to display</div>\n"; ?> [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom