Jump to content

deepson2

Members
  • Posts

    260
  • Joined

  • Last visited

    Never

Everything posted by deepson2

  1. Thanks for your reply ChemicalBliss, But my link titles are going to be changed every time so i can not match it with the exact link name. Any more suggestion?
  2. Hello all, I am storing data from csv file to database. For one of the column i am storing description and this description has a few links like this- $string = " Lorem ipsum dolor sit amet,www.goggle.com.Aliquam pretium ullamcorper urna quis iaculis. Etiam ac massa sed turpis tempor luctus. Curabitur sed nibh eu elit mollis congue. Praesent ipsum diam, consectetur vitae ornare a, aliquam a nunc. In id magna pellentesque tellus posuere adipiscing. Sed non mi metus, at lacinia augue. Sed magna nisi,www.facebook.com,mollis sed nunc. Etiam at justo in leo congue mollis. Nullam in neque eget metus hendrerit scelerisque eu non enim. Ut malesuada lacus eu nulla bibendum id euismod urna sodales. "; So this description has two links goggle.com and facebook.com Now my questions are- 1) Can we store these links as links only into the database? 2) while selecting this row can i show the link as link only so user can click on this particular link and use it probably? Thanks in advance
  3. Thanks for your reply Lukeidiot, If we consider the exact code yours I am getting mail for the last recipient only(Email3@gmail.com). What should i try now?
  4. I have tried the above solution but its not working. Tried this also mail($recipient, $subject, $message, 'CC: eavesdropper@example.com'); mail($recipient, $subject, $message, 'cc: eavesdropper@example.com'); How can i get CC using php mail function? I don't want to use header because header is not working for me(And i have tried it already) Thanks in advance.
  5. Thanks for the reply to both of you. Yes i was thinking something similar like if i can check the categories of what user has seen the videos before so i can store them and next time show them the most recent videos belong to that particular category. Anyways i have got the logic. Thank you.
  6. But I don't think we need to activate any subscription for it or something? because whatever we checks like php tutorial video and then we logged out and when we comes back and do logged in again it ll show more videos related to php tutorial. what you think?
  7. Thanks for your reply mchl. Could you please elaborate your point here-
  8. Hello, I was just wondering that how youtube 's "Recommended for you" logic works. like it checked all the urls /videos you have watched last time(logged in time) and next time when users logs in, it ll show him/her the related those videos(probably most popular) he/she had watched earlier. i was just wanted to know its rough idea that how it works. Can anyone tell me how it works? Thanks in advance.
  9. I want to check my values are numeric or not. i have been loosing my patients for why my for loop is not working here. :'( it checks only first value and gets stopped later. Here is my code js function NumericVal(fieldList1) { var field1=new Array(); field1=fieldList1.split("~"); //alert(field1); var counter=0; for(i=0;i<field1.length;i++) { //alert(document.getElementById(field1[i]).value); if((document.getElementById(field1[i]).value !="") && ( IsNumeric(document.getElementById(field1[i]).value)==false)) { document.getElementById(field1[i]).style.backgroundColor="#FF0000"; counter++; } } //i++; if(counter > 0) { alert("Please enter only numeric values"); return false; } else { return true; } } function IsNumeric(strString) // check for valid numeric strings { var strValidChars = "0123456789.-"; var iChars = "`~=!@#$%^&*()<>+_[]{}\\;:\"\'?\/"; var strChar; var blnResult = true; if (strString.length == 0) return false; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strValidChars.indexOf(strChar) == -1) { blnResult = false; //alert("Please enter only numeric values"); } } return blnResult; } then calling it here var checkValidation1= NumericVal('units~units_size'); if((checkValidation1==true) { //do updation } Can anyone why my for loop is not working? Thanks in advance.
  10. Thanks a lot i wanted something similar but the problem is if i have following result for the first time i get the following o/p- Now if i added new name "sachin" it gives me me result like this it should append only sachin not the entire query again. whats the problem can anyone please tell me. and i was trying something to do this without Jquery also. Here is the code which i found on the net <html> <head> <script> /* Auto Refresh Page with Time script By JavaScript Kit (javascriptkit.com) Over 200+ free scripts here! */ //enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59 // now we are considering the time here is 30 sec. var limit="0:30" if (document.images) { var parselimit=limit.split(":") parselimit=parselimit[0]*60+parselimit[1]*1 } function beginrefresh(){ if (!document.images) return if (parselimit==1) window.location.reload() else{ parselimit-=1 curmin=Math.floor(parselimit/60) cursec=parselimit%60 if (curmin!=0) curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!" else curtime=cursec+" seconds left until page refresh!" window.status=curtime setTimeout("beginrefresh()",1000) } } window.onload=beginrefresh </script> </head> <body> <center><h1>****Test****</h1></center> <div id="random"> <?php ini_set( "display_errors", 0); ini_set("display_errors",0); $link = mysql_connect('****', '***', '***') or die('Could not connect: ' . mysql_error()); //echo 'Connected successfully'; mysql_select_db('***') or die('Could not select database'); $sql = mysql_query("Select ename from table1"); $record_count=mysql_num_rows($sql); //Display count......... if(mysql_num_rows($sql) > 0){ while($row = mysql_fetch_array($sql)){ echo $row['ename']; echo "<br/>"; } } @mysql_free_result($sql); //echo $record_count; ?> </div> </body> </html> But problem with this page is, i can actually see the page is getting refreshed though i am not clicking on the refresh button and another thing is i want to refresh only one div not the whole page.
  11. ok, i want to do something like this- 1)Get one page where my select query result is there. 2)Refresh(or check) it in every 2 sec, and if new result is exactly the same as previous result don't do anything. 3)If you get new entry(record) result then show(refresh) it immediately without refreshing the page . But i really really don't know how i can do this with AJAX. Can anyone please guide me in right direction.?
  12. I have been searching around but not able to find any related link on this.can anyone please give me any similar link so i can check it and ll get some idea probably.
  13. Thanks for your reply mjdamato , Could you please elaborate more? As you mean i should take one php page(lets say result.php) and i need to refresh this page after n secondand i want to show that result on another page(lets say index.php) so you think this ll work. is that something you are suggesting?
  14. Thanks for your reply. but that link didn't give me any direction for my this question ->
  15. ok, here is the following code, where page is refreshing after some time <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.0/jquery.min.js"></script><script type="text/javascript"> function getRandom() { $("#random").hide("slow"); $("#random").load("http://www.google.co.uk", '', callback); } function callback() { $("#random").show("slow"); setTimeout("getRandom();", 10000); } $(document).ready(getRandom); </script> </head> <body> <h1>Test</h1> <div id="random"> <?php $link = mysql_connect('###', '###', '##') or die('Could not connect: ' . mysql_error()); //echo 'Connected successfully'; mysql_select_db('##') or die('Could not select database'); $sql = mysql_query("Select ename from table1"); $record_count=mysql_num_rows($sql); //Display count......... if(mysql_num_rows($sql) > 0){ while($row = mysql_fetch_array($sql)){ echo $row['ename']; echo "<br/>"; } } echo $record_count; ?> </div> </body> </html> getting the name like this- I don't want to refresh this page until and unless the new name wont get added into my list. I mean how we can check with this using JS that div should get refreshed only when the new record is inserted into the database? please help me.
  16. Hello, I was just wondering how the twitters new post comes without even refreshing the page. see this http://juitter.com/ I just wanted to ask that can i apply it for really time application also apart from twitters new post? Suppose i am showing recent visitors on profile page.The most recent visitor would be "1 min ago".If suddenly new user comes so i just want to append that user with the message "about a min ago" without refresh like done there on the about site.. Can anyone please tell me whether is a possible or not . if yes, then what things i need to consider? Thanks in advance.
  17. Got the count as well!! see the query- $sqlpage = $op->runsql("select *,count(*) as cnt story_name, GROUP_CONCAT(a.name) from user_details a JOIN report_story r ON a.userid = r.userid group by story_name ORDER BY r.userid DESC LIMIT $start, $limit_value"); GROUP_CONCAT is really new Aggregate function for me. Once again thanks a lot rajiv. Marry Christmas!
  18. Thnaks a lot for your reply perfect query rajiv, now i want count as well for "GROUP_CONCAT(a.name)" so i can show like 2 people have recommended this story. so how can i put that in to it?
  19. Try this $sql = mysql_query("SELECT * FROM pro0ject WHERE name = '".$_POST['fname']."'"); if(mysql_num_rows($sql) > 0){ while($row = mysql_fetch_array($sql)) { echo $row['name']; echo "<br>"; echo $row['usn']; } }
  20. Hello, I have following two tables report_story user_details now i want to show my result somthing like this I don't want to show unnecessarily two rows here. So i was trying the following queries which are not working select *,count(*)as cnt from user_details a JOIN report_story r ON a.id = r.userid GROUP BY r.id ORDER BY r.id DESC LIMIT $start, $limit_value"); if(mysql_num_rows($sqlpage) > 0){ ?> <tr> <td width="100%" align="left"><h1 class="pageTitle">Story Report</h1> <p>Total <b><?=$total_records;?></b>listing</p> </td> </tr> <tr> <td width="100%"> <? while($row = $op->select($sqlpage)){ ?> <tr bgcolor="#FEF9E6"> <tr bgcolor="#FEF9E6"> <td width="25%" class="loginText">Title </td> <td width="75%" class="Text"><a href="<?=$row['story_name'];?>" title="<?=stripslashes($row['story_name']);?>" ><?=stripslashes($row['story_name']);?></a></td> </tr> </tr> <tr bgcolor="#FDFAEE"> <? echo "SELECT a.username, r. * FROM user_details a JOIN story_report r ON a.id = r.id WHERE r.id='".$row['id']."'"; $sqlrpt = $op->runsql("SELECT a.username, r. * FROM user_details a JOIN story_report r ON a.id = r.id WHERE r.id='".$row['id']."'"); if(mysql_num_rows($sqlrpt) > 0){ while($row1 = $op->select($sqlrpt)){ $reportedby.= $row1['username'].", "; } } ?> <tr bgcolor="#FEF9E6"> <td width="25%" class="loginText">Reported by</td> <? $reportedby =substr($reportedby, 0, -2); ?> <td width="75%" class="blogText" valign="top"><?=$reportedby; $reportedby="";?></td> </tr> <tr> <td colspan="3" width="100%"> </td> </tr></table> </div> <? } }?> </td> </tr> Can anyone please see this and tell me how can i achieve the exact result? Thanks in advance.
  21. With putting some condition i am able to get both the links on same page with some condition that So if geetap claims her blog then her new blog url should be so i want to redirect old url i.e to Can anyone please tell me how can i do that?
  22. I am working on blog related site earlier i have my blog details page with this url Where my world is the title and i was appending the username with it so we came to know that "johnd" is the registered user for the blog "my world" Now we have many anonymous blogs on our site. i want user could claim on it. and then redirect those url to the old one. so the new url would be like this where geetap is the username and its her blog now registered on the site. function info(){ global $url; $info1= &NEW abc; // echo $url; $user=explode("-", $url, 2); $urlarr= explode("_", $user[0]); $extrcond=""; $urrcount=count($urlarr); for($i=0;$i<$urrcount;$i++){ $extrcond .="AND b.title like '%".$urlarr[$i]."%'"; } $result = "SELECT b.title, b.id,b.url, u.id,u.username FROM b_details b,user_details u WHERE u.id = b.id AND a.username='".$user[1]."' ".$extrcond); return $info1; } categories.php <?php $url =$_REQUEST['url']; //echo $url; // this url is my url which comes in address bar- mysite/categories/my_worls-jonhd $details = $abc->info(); ?> Can anyone please read this and guide me in the right direction. i am not able to figure it out whether i can do this with only php or i need to change my mod-rewrite as well?? I have put up a thread in Apache HTTP Server sections as well http://www.phpfreaks.com/forums/index.php/topic,280594.0.html please help me.
×
×
  • 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.