Jump to content

ashadweb

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ashadweb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok thanks i did can u help me?
  2. Hi, i have a php contact form and recently i tried to add a capcthca code to that but its not working properly. http://ashad.info/sv/seo+vantage+contact+us.php here is the code any idea? <form action="mailer.php" method="POST" onsubmit="MM_validateForm('name','','R','company','','R','phone','','RisNum','email','','RisEmail');return document.MM_returnValue"> <fieldset id="contact_form"> <ol> <li> <label>Name :<em>*</em></label> <input name="name" type="text"/> </li> <li> <label>Company :<em>*</em></label> <input name="company" type="text"/> </li> <li> <label>Address :<em>*</em></label> <textarea name="address" cols="" rows="" style="width:150px;"></textarea> </li> <li> <label>City :<em>*</em></label> <input name="city" type="text"/> </li> <li> <label>Phone :<em>*</em></label> <input name="phone" type="text"/> </li> <li> <label>E-mail :<em>*</em></label> <input name="email" type="text"/> </li> <li> <label>Comments :</label> <textarea name="comments" cols="" rows="" style="width:150px;"></textarea> </li> <li><label>Type verification image : </label> <input name="verif_box" type="text" id="verif_box" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"/> <img src="verificationimage.php?<?php echo rand(0,9999);?>" alt="verification image, type it in the box" width="50" height="24" align="absbottom" /><br /> <br /> <!-- if the variable "wrong_code" is sent from previous page then display the error field --> <?php if(isset($_GET['wrong_code'])){?> <div style="border:1px solid #990000; background-color:#D70000; color:#FFFFFF; padding:4px; padding-left:6px;width:295px;">Wrong verification code</div><br /> <?php ;}?> <br /> <br /> <input name="submit" type="submit" class="subbtn" value=" " style="margin-left:200px;"> </ol> </fieldset> </form> here is the php code <?php $verif_box = $_REQUEST["verif_box"]; // remove the backslashes that normally appears when entering " or ' $from = stripslashes($from); // check to see if verificaton code was correct if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){ // if verification code was correct send the message and show this page include ("email.php"); // delete the cookie so it cannot sent again by refreshing this page setcookie('tntcon',''); } else { // if verification code was incorrect then return to contact page and show error header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true"); exit; } ?> <? include ("thanks.php"); ?> [b][color=red]email.php page below [color=blue]<?php header('Location: thanks.php'); if(isset($_POST['submit'])) { $to = "ashadweb@gmail.com"; $subject = "From SEO Vantage Contact us page"; $name = $_POST['name']; $company = $_POST['company']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $phone = $_POST['phone']; $email = $_POST['email']; $comments = $_POST['comments']; $verif_box = $_REQUEST["verif_box"]; $body = " Name : $name\n Company : $company\n Address : $address\n City : $city\n State : $state\n Zip : $zip\n Phone : $phone\n Email : $email\n Comments : $comments"; $from = "From: $email"; echo "Data has been submitted to $to!"; mail($to, $subject, $body, $from); } else { echo "sorry your data havn't been sent (error)"; } ?> captcha php file below <?php session_start(); $RandomStr = md5(microtime());// md5 to generate the random string $ResultStr = substr($RandomStr,0,5);//trim 5 digit $NewImage =imagecreatefromjpeg("img.jpg");//image create by existing image and as back ground $LineColor = imagecolorallocate($NewImage,233,239,239);//line color $TextColor = imagecolorallocate($NewImage, 255, 255, 255);//text color-white imageline($NewImage,1,1,40,40,$LineColor);//create line 1 on image imageline($NewImage,1,100,60,0,$LineColor);//create line 2 on image imagestring($NewImage, 5, 20, 10, $ResultStr, $TextColor);// Draw a random string horizontally $_SESSION['key'] = $ResultStr;// carry the data through session header("Content-type: image/jpeg");// out out the image imagejpeg($NewImage);//Output image to browser ?>
  3. found the solution position:relative; #tophr a{ text-align:right; font-size:11px; color:#555556; text-decoration:none; display:inline; position:relative; }
  4. Hi, in http://ashad.info/cc/ HOME and CONTACT Link doesn't work properly in ie couldn't figure out the problem Firefox its ok. may be css problem can any one know why is tht?
  5. oh thanks dadamssg il try this
  6. I HAVE MADE A LOGIN SYSTEM WITH 3 USER PRIVILAGES 1.ADMIN 2.SUPERADMIN 3.USER THE DATABASE IS BELOW -- Table structure for table `login` -- CREATE TABLE IF NOT EXISTS `login` ( `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `permission` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `login` -- INSERT INTO `login` (`username`, `password`, `permission`) VALUES ('admin', 'admin12345', 1), ('sadmin', 'sadmin12345', 2), ('user', 'user12345', 3); AND THE CODE IS BELOW TO ALLOW ADMIN TO ACCESS TO THE PAGE admin_success.php NOW MY PROBLEM IS HOW DO I CONTINUE THE CODE TO ACCESS TO SUPER ADMIN AND USER EX: SUPERADMIN PAGE IS sadmin_success.php im still a beginer for php plz help me here is the php code for it. <?php include ("dbconnect.php"); // Define $myusername and $mypassword $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword' && permission=1 "; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:admin_success.php"); } else { $error_up = "Sorry! Wrong Username or Password"; } ob_end_flush(); ?>
  7. Hi, i want to know how can we make a email validator like this? http://www.monoprog.com/prod/asp_net_components/email_validator_net.aspx lot of scripts available in the internet to valaidate but not like the above link. not only to validate the email addres but also to check this email exits or not.
  8. Hi, I making a web site and i have a code but this is not working properly dont knw why help me code is bellow ############################################################## JAVA SCRIPT <script type="text/javascript"> if (document.images) { image0 = new Image; image1 = new Image; image2 = new Image; image0.src = "<?= $im_array[0] ?>"; image1.src = "<?= $im_array[1] ?>"; image2.src = "<?= $im_array[2] ?>"; } else { image0 = ''; image1 = ''; image2 = ''; document.rollimg = ''; } </script> ################################# PHP CODE <?= "<span onmouseover=document.rollimg.src=image0.src;> <img src=\"../cars_images/$im_array[0]\" class=thumb_img width=150 height=150 alt=1\"> </span> " ?> <?= "<span onmouseover=document.rollimg.src=image1.src;> <img src=\"../cars_images/$im_array[1]\" class=thumb_img width=150 height=150 alt=2\"> </span>" ?> <?= "<span onmouseover=document.rollimg.src=image2.src;> <img src=\"../cars_images/$im_array[2]\" class=thumb_img width=150 height=150 alt=3\"> </span>" ?> </p> <p align="center"> <?= "<img src=\"../cars_images/$im_array[0]\" class=thumb_img width=150 height=150 alt=Larger version of one of the smaller images above name=rollimg\">" ?> </p> ######################################
×
×
  • 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.