Jump to content

ansarka

Members
  • Posts

    128
  • Joined

  • Last visited

    Never

Everything posted by ansarka

  1. change the line $finalmessage='Inquiry For : '.$inquiry.' <br> $message'; to $finalmessage='Inquiry For : '.$inquiry.' <br>'. $message;
  2. AND IF YOU WANT TO PRINT USE THE FUNCTION ECHO $DATE
  3. thats what the above code will do :o :o <? selecting the distinct dates STARTING THE TABLE OPENING GETTING THE INFORMATION OF THAT DATE FROM OTHER TABLE , YOU CAN SKIP THIS IF YOU WANT CLOSING THE TABLE AFTER EACH DATE } ?>
  4. <?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $inquiry=$_REQUEST['inquiry']; $inquiry=@implode(",",$inquiry); $finalmessage='Inquiry For : '.$inquiry.' <br> $message'; mail( "info@creativostudios.net", "Inquiry from Creativo Studios website.", $finalmessage, "From: $email" ); $respond_subject = "Thank you for contacting us!"; $respond_message = "Hello! Thank you for contacting us! We will get back to you as soon as possible! Yours sincerely, Saad Khalid Khan www.creativostudios.net "; mail($email, $respond_subject, $respond_message); header( "Location: http://www.creativostudios.net" ); ?> ------------------------------------------------------- this is the new HTML code. <!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=utf-8" /> <title>Untitled Document</title> </head> <body> <table width="520" border="0"> <tr> <td width="514"><form method="post" action="send_mail.php"> <table width="470" border="0"> <tr> <td width="107">Name:</td> <td width="353"><label> <input type="text" name="name" id="name" /> </label></td> </tr> <tr> <td>Email:</td> <td><label> <input type="text" name="email" id="email" /> </label></td> </tr> <tr> <td valign="top">Inquiring about:</td> <td><label> <select name="inquiry[]" size="3" multiple="multiple" id="inquiry"> <option value="Web">Web Designing</option> <option value="Graphics">Graphics Designing</option> <option value="Software">Software Development</option> </select> </label></td> </tr> <tr> <td valign="top">Message:</td> <td><label> <textarea name="message" id="message" cols="45" rows="5"></textarea> </label></td> </tr> <tr> <td valign="top"> </td> <td><label> <input type="submit" name="Submit" id="Submit" value="Submit" /> </label></td> </tr> </table> </form> </td> </tr> </table> </body> </html>
  5. the requirement is simple different language string for each word will be stored in database when some user open the page for first time all the strings will be stored in a APC (Alternate php cache) , so when the user hits the each page , instead of querying the db for the string you can take it from cache , this will help you to increase the performance and reduce the use of bandwidth
  6. plz go through the code i am taking the distinct dates then i will start a new loop to take the details of the date each distinct date details will be shown in different table (HTML) if this is not your requirement, try to describe in details ???
  7. you are using same name 'message' for bot combo box and text area so you will get only one value in variable message rename any one of below <td><label> <select name="message" size="3" multiple id="message"> <option id="message">Web Designing</option> <option>Graphics Designing</option> <option>Software Development</option> </select> </label></td> </tr> <tr> <td valign="top"><span class="style7">Comments:</span></td> <td><label> <textarea name="message" id="message" cols="45" rows="5"></textarea>
  8. <? $res_head="select distinct(date(timestamp) from `tablename` where date(timestamp) >='".$start_date."' date(timestamp) <= '".$end_date."' and status=0"; $res1=mysql_query($res_head); $data=""; while($res=mysql_fetch_array($res1)){ $data .='<table>'; $res2="select from table where date='$res[0]'"; while($res3=mysql_fetch_array($res2)) { $data .='<tr>'; $data .='<td>'.$res3[0].'</td>'; $data .='<td>'.$res3[1].'</td>'; $data .='</tr>'; } $data .='</table>'; } ?>
  9. chk the function move_uploaded_file // to upload file mkdir() // to make directory
  10. if you try to send 10,000 mails continuously from the server , it will be a problem your mail server will be black listed to a spammer , so all mails send from your sever will be consider as spam mails to avoid this you can always have a scheduler like cron to send a limited amount of mails at a time
  11. you can use the help of cron job to run the php file in a time interval
  12. what is the problem ????? :o :o ??? ??? ??? ??? ??? ??? ???
  13. $password=md5($password); ADD ABOVE CODE ABOVE $sql = "SELECT * FROM members WHERE username='$username' and password='$password'"; $result = mysqli_query($connection, $sql);
  14. TRY this code <script> function button_chk() { var formName = document.formname; if( formName.chkBoxName.checked == true ) { formName.submit.disabled=false; }else { formName.submit.disabled=true; } } </script> <form name='formname'> <input type="checkbox" name='chkBoxName' onclick="button_chk()" > <INPUT class=button type=submit value=Sign Up name=submit id="submitter" disabled="disabled"> </form>
  15. in onchange calla javascript function , Try below code [code] <input type="checkbox" name="chkBoxName" onclick="button_chk()'" > <script> function button_chk() { var formName = document.formname; if( formName.chkBoxName.checked == true ) { formName.submit.disabled=false; }else { formName.submit.disabled=true; } } </script> <form name='formname'> <input type="checkbox" name='chkBoxName' onclick="button_chk()" > <INPUT class=button type=submit value=Sign Up name=submit id="submitter" disabled="disabled"> </form> [/code]
  16. complete code <?php $link = mysql_connect('host', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname); $result = mysql_query("select * from examinee where firstname = '".$_SESSION['bago']."' and lastname = '".$_SESSION['bago2']."'"); while ($row_result = mysql_fetch_array($result)) { $total = $row_result['math'] + $row_result['english'] + $row_result['logic']; echo $total; } ?>
  17. try this <input type="checkbox" onclick="document.getElementById('submitter').disabled=''" >
  18. if you are storing the md5 password in db you have to convert the user entered password to md5 before checking i in sql a small change in above code $password=md5($password); $sql = "SELECT * FROM members WHERE username='$username' and password='$password'"; $result = mysqli_query($connection, $sql);
  19. <? ......... $total=$row_result['math']+$row_result['english']+$row_result['logic']; ?>
  20. write the sql code and run the code <?php // we connect to example.com and port 3307 $link = mysql_connect('host', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname); $insert_query="insert into tablename values('1','2','3')"; $result=mysql_query($insert_query); ?>
  21. Your code will result in to a infinite loop , i had modifed the code this will list all the folders in a combobox $dir = '/home/'; this will be considered as path from root directory if you want to give relative path give like $dir = '../classes/'; echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">"; echo "<select name=\"cat\">"; $dir = '/home/'; $folders = scandir($dir); foreach ($folders as $Fname) { if ($Fname != "." && $Fname != ".." && is_dir($dir.$Fname)) { echo "<option value=\"$Fname\">{$Fname}</option>"; } } echo "</select></form>";
  22. i dont think you can open applications using php command line execution you can communicate to application using commands not sure you can open notepad or any other application plz reply if i am wrong
  23. let the database field be varchar itself you can write a simple update query selecting each fields in DB and updating the password field with md5 encryption . for md5 conversion you can use php function md5 $pwdencry=md5($oldpassword)
  24. function split_array($string,$splitter) { $textarea_text_array = explode($splitter, $string); return $textarea_text_array; } you can call this function like split_array('/', $string); split_array('/n', $string);
×
×
  • 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.