Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. try this. I think this one would give ur result.. <?php $string = "word1*<p>description1...</p>word2*<p>description2.....</p>word3*<p>description3......</p>word4*<p>description4</p>"; $piece=explode("</p>", $string); echo htmlspecialchars($piece[0])."<br>"; echo htmlspecialchars($piece[1])."<br>"; echo htmlspecialchars($piece[2])."<br>"; echo htmlspecialchars($piece[3])."<br>"; ?>
  2. hai try this code which i have downloaded long back.. [attachment deleted by admin]
  3. <?php $string = "word1*<p>description1...</p>word2*<p>description2.....</p>word3*<p>description3......</p>word4*<p>description4</p>"; $piece=explode("</p>", $string); echo $piece[0]."<br>"; echo $piece[1]."<br>"; echo $piece[2]."<br>"; echo $piece[3]."<br>"; ?>
  4. Have u checked this function explode.. http://php.net/manual/en/function.explode.php
  5. ohhh it is not that i cannot see ur code.. i didnt tested it out in my machine thatz what i was saying..lol...
  6. have u checked whether the port that you are using is open in the server. check for port 25..
  7. hai i dont see your code, but you can try this code. i am sure this will work quite good.. u require Pear to be installed in your machine for this to work.. [attachment deleted by admin]
  8. echo the value of $id and see whether u are getting any results into that.. first check this documentation regarding the $_request http://www.alternateinterior.com/2007/01/what-is-_request.html
  9. yes i can do that but u need to show me the table structure and some sample data so that i can help u out. skype me at chaitanya09986025424
  10. check this in ur command prompt telnet localhost 25 if the port is open then it will allow you to send the mail. other wise the only other option left for you is to use the smtp server to send mails.. u can configure the smtp in the php.ini file check this article for your reference http://articles.sitepoint.com/article/advanced-email-php
  11. hai in ur code i dont got this query $eventdate = date("Y-m-d","$row[year]-$row[month]-$row[day], int mktime ([ int $hour = 0 [, int $minute = 0 [, int $second = 0 [, int $month = $row[month] [, int $day = $row[day] [, int $year = $row[year] [, int $is_dst = -1 ]]]]]]] )"); thw $sql doesnot have any row month or day or year.. are u sure u wrote the correct one
  12. in the side bar code u didnt mentioned any action value for the form.. <form id="formID" class="formular" method="post" action=""> u need to mention the action so that it should do that code after any one presses the button/submit
  13. if u could post the code then it would be more easier to help u out
  14. that means u already have a database with that name so u cannot create a new one.. at least with the same name... u can use the query like this CREATE DATABASE IF NOT EXISTS homebudget;
  15. Thanks Thanks ToonMariner. Its working now.. Check this post before turning the global variables on http://roshanbh.com.np/2008/02/register_globals-php-security-problem.html
  16. I think in the php.ini of the new server you dont have the short_open_tag on. so this could be giving the problem.. just check that..
  17. Hi i have created this one long back for some fellow.. it displays the images that has been uploaded.. just have a look.. <?php if ($_REQUEST[completed] == 1) { $newname = uniqid("").".jpg"; move_uploaded_file($_FILES['mailfile']['tmp_name'], "img_upload/$newname "); } ?> <html> <head><title>Upload page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #7BC623; } --> </style></head> <body> <p> <?php if ($_REQUEST[completed] != 1) ?> </p> <p> <b>Please upload an image</b> <br> </p> <form enctype=multipart/form-data method=post action="upload_new.php"> <input type=hidden name=MAX_FILE_SIZE value=1500000> <input type=hidden name=completed value=1> Choose an image: <input type=file name=mailfile> and <input type="submit" name="Submit" value="Submit"></form> <p> <?php //echo "$newname "; $pic = "'/img_upload/'.$newname"; echo $pic."<br>"; print ("<IMG SRC =img_upload/$newname>"); // load the file to send: //readfile($pic); ?> <!--<img src="<?php $pic ?>" alt="File" border=0>--> </p> <hr> </body></html>
  18. hai u need to start another variable for the second table as if u run the entire query like this $sql=" DROP TABLE IF EXISTS `admin_user`; CREATE TABLE `admin_user` ( `admin_user` varchar(20) NOT NULL default '', `pwd` varchar(20) NOT NULL default '', `email_id` varchar(50) NOT NULL default '', `first_nm` varchar(30) NOT NULL default '', `last_nm` varchar(30) NOT NULL default '', PRIMARY KEY (`admin_user`) ) "; it will give you an error.. so it is better u start a new string al together...
  19. i think u forgot to post the remaining code..
  20. so is it that if i write my code some thing like this will it work.. VALUES ('',$_POST['starter'],$_POST['starterQty'],$_POST['mainCourse'],$_POST['mainCourseQty'],$_POST['dersert'],$_POST['dersertQty'])";
  21. yes i think this should resolve the issue
  22. @jl5501 if he dont put the '' for the field names then how will he insert the text fields in the database. doesnot that give an error..
  23. echo $sql and check pasting that in the phpmyadmin and run that u might come to know
×
×
  • 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.