joshisumitnet -1 Light Poster

Nobody is here to help me to Develop this Collage Image?

joshisumitnet -1 Light Poster

Dear Friends,

The problem I am facing a that how to Hide and Unhide Div tags in IE7 and IE8?

My code is

<div>
                            <a href='javascript:void(0)' onclick='DisplayAddComment();'>
                                <img src="../images/AddComment.jpg" border="0"/>
                            </a>
                        </div>

and javaScript Function is

var m=1;
            function DisplayAddComment()
            {
                if(m==1)
                {
                    document.getElementById("dvAddComments").style.visibility="visible";
                    document.getElementById("dvAddComments").style.display="table";
                    m=0;
                }
                else
                {
                    document.getElementById("dvAddComments").style.visibility="hidden";
                    document.getElementById("dvAddComments").style.display="none";
                    
                    m=1;
                }
            }

This code is working in all most available Browsers.
Only IE creates the problem.

Thanks in Advance.

Sumit Joshi

joshisumitnet -1 Light Poster

Dear Friend,

Thank you for your great help and time you spent for me.
But I found my mistake that in the style tag, I don't know exactly, there is one style
iframe {display:none;}

That is why it is not showing FCKEditor. Because FCKEditor is using iframe.

Thank you for spent time for me.

Sumit Joshi

joshisumitnet -1 Light Poster

Dear Friends,

I am using FCKEditor in my website. It's working all over in website fine.

But there is one page in which it does not showing properly. I tried all things but in that page is does not showing properly.

I have one hidden div tag. When user clicks on "Edit Description" link from Edit button, hidden div tag is shown but FCKEditor is not getting shown there. Please give me some tips.

My code is to show the FCKEditor is

include_once '../FCKEditor/fckeditor.php';
                                    function nukeMagicQuotes()
                                    {
                                        if (get_magic_quotes_gpc())
                                        {
                                            function stripslashes_deep($value)
                                            {
                                                $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
                                                return $value;
                                            }
                                            $_POST = array_map('stripslashes_deep', $_POST);
                                            $_GET = array_map('stripslashes_deep', $_GET);
                                            $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
                                        }
                                    }
                                    nukeMagicQuotes();
                                    if(isset($_REQUEST['cancel']))
                                    {
                                        $oFCKeditor->Value=null;
                                    }
                                    $oFCKeditor = new FCKeditor('txtdescribe');
                                    //$oFCKeditor->BasePath = "FCKeditor/editor/";
                                    $oFCKeditor->Value    = "";
                                    $oFCKeditor->Width    = 295;
                                    $oFCKeditor->Height   = 130;
                                    echo $oFCKeditor->CreateHtml();
joshisumitnet -1 Light Poster

Dear Friends,

Please look at this query...

Select mytext from tblhebrew where mytext='שאלות נפוצות'

When I run this query directly in phpMyAdmin then it's working perfectly.
But when I run same query using php script then it does not working.
Why?
Please see this is my php script code...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="he" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Home Page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </head>
    <body>
<?php
$link=  mysql_connect("localhost","root","");
mysql_select_db("dbhebrew");
//mysql_query("insert into tblhebrew (test,description) values ('עדיין לא רשום ? הרשם עכשיו ','עדיין לא רשום ? הרשם עכשיו ')");
$txt="שאלות נפוצות";
$query="Select mytext from tblhebrew where mytext='".mysql_real_escape_string($txt)."'";
echo $query;
$result=mysql_query($query) or die(mysql_error());

$row=mysql_fetch_assoc($result);

echo "output:".$row['mytext'];
?>
    </body>
</html>

Thanks in advance.

joshisumitnet -1 Light Poster

my query is
select Title from tblStuff where upper(convert(Title using latin1)) like '" . addslashes(strtoupper($keyword)) . "%' limit 0,20

I have two languages at one go.Means either Hebrew or English.

Then what to do?
Or let me say that only want Hebrew then what is solutions?
Thanks

joshisumitnet -1 Light Poster

Dear Friend paulrajj,

Thank you very much.

joshisumitnet -1 Light Poster

CREATE TABLE IF NOT EXISTS `tblstuff` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'P.K.',
`MemberID` bigint(20) NOT NULL COMMENT 'F.K. Member Table',
`Title` varbinary(255) NOT NULL,
`CategoryID` bigint(20) NOT NULL COMMENT 'F.K. Category Table',
`TagID` bigint(20) DEFAULT NULL COMMENT 'F.K. Tag Table',
`Rate` int(3) DEFAULT NULL,
`Views` bigint(20) DEFAULT NULL,
`Status` enum('A','I','D','L') NOT NULL,
`HomePageStatus` enum('D','N') NOT NULL,
`CreatedDate` date NOT NULL,
PRIMARY KEY (`id`),
KEY `TagID` (`TagID`),
KEY `CategoryID` (`CategoryID`),
KEY `MemberID` (`MemberID`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=DYNAMIC AUTO_INCREMENT=136 ;

joshisumitnet -1 Light Poster

Dear Friends,

I want help to generate www.bestuff.com like paging in my application because my client want same thing and in today's era this thing is found everywhere.

I searched a lot but still could not found help.

Here I am providing link to that paging so that you can check it.

http://bestuff.com/tag/all

Waiting for help from anybody.

Thank you very very very very very much in advance.

Joshisumitnet

joshisumitnet -1 Light Poster

Dear Friends,

I want to know that how can we compare two hebrew string in MySQL database?

I tried and search a lot on net but still could not found the answer.

My website is dealing with Hebrew(main) and English as well.

So please let me know How can I compare these two languages in SQL queries.
Because this problem is became headech for me now. My client is becoming engry and engry and engry..... on me.

Is there any solution for this?

Please help me out.

I am waiting for your reply. Please do it fast as soon as possible.

Thank you in advance.

Joshisumitnet

joshisumitnet -1 Light Poster

amit if you have set the session time for 10 minute.so then it does't matter that user close the browser. session will automaticaly destroyed after 10 minute.

Dear Freddavis,

You all right that when browser get closed all session varialbes will be destroyed.

My main and serious problem is how to Update table when browser get closed?

I am finding this answer since long time and have visited most websites and forums but could not found solutions yet.

Is there anybody who can solve this?
Is there any expert in daniweb who can solve my problem?

joshisumitnet -1 Light Poster

Dear Friends,

Ok I agree with you that it's time out.
But how I able to check from Server that User has session time out and then update the table?

joshisumitnet -1 Light Poster

Dear Friend,

Thank you for you time and reply.

See my exact problem
1. visit http://bestuff.com
2. At the last there is section of "Active Members", in which it shows top 40 to 44 users who are online.
3. When I get logged in, I will be shown on that list because I just logged in last.
4. When I close browser without logging out force fully then my profile image will be removed from that section.

If you have any other solution for that please help me that how to do?

Thanks in advance.
Sumit Joshi

joshisumitnet -1 Light Poster

Dear Chintan,

Thanks for reply.
My problem is when user closes browser, automatically database table must be updated.

My problem is that I am not able to execute query on browser's close event.

Seeking good help.

joshisumitnet -1 Light Poster

Dear P0lT10n,

Update query is executing perfectly when we logout force fully or when browser is opened and session is time out.

My problem is how to logout when user closes browser?

When user closes browser, there should be some code to handle that browser close problem.

Please work out on that.

Thank you for reply.
Sumit Joshi

joshisumitnet -1 Light Poster

Dear Friends,

I am following the bestuff.com's active member session.
I am doing the following thing...
1. when user logs in, I update my database's field with value 'O' (means user is logged in and fires query which has flag value 'O')


But the problem is how to check user's status when User closes browser?

I set 10 minutes session time out but it only works when user refreshes or visits the page.

Please help me out of this... hell...

Please reply me fast and please admin section also take part in this query/problem...

Thanks in advance

index.php
----------

session_start();
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 600))
{
    // last request was more than 30 minates ago
    //session_destroy();   // destroy session data in storage
    //session_unset();     // unset $_SESSION variable for the runtime
    header("location:logout.php");
}
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp

logout.php
----------

session_start();
include_once 'commoninclude.php';
$objLogin=new MySQLConnection();
$objLogin->Open();
$updateMemberOnlineStatus="Update tblMemberRegistration Set OnlineStatus='F' Where ID=".$_SESSION['memberid'];
$objLogin->UpdateQuery($updateMemberOnlineStatus);
$objLogin->Close();
session_unset();
session_destroy();
header("location:index.php");

but the above code does not working...

please help

joshisumitnet -1 Light Poster

Dear Friends,

Nobody is here to solve this for me????

Pleasa help me out this...

joshisumitnet -1 Light Poster

Dear Friends,

Please help me out to display a Collage page same link in http://bestuff.com

The images are generated in random size through CSS.

I am confused how to display images like in varying size?

Please help me out. I am on deadline.

I thought lot but could not succeeded.

Thank you in advance.

joshisumitnet -1 Light Poster

Dear Friend,
Please go to this link http://w3schools.com/php/php_ajax_rss_reader.asp
It has explained how to read RSS feed with very easy example and working successfully. You can visit my site in which I have used that example here http://sabsyp.com/rss/simple.php
It may take few seconds to load becaused it fetches RSS feed from most busy websites called Google and MSN.

Thank you.

joshisumitnet -1 Light Poster

Great Binary Search Recursive Function.
Cheers. :)

#include<stdio.h>
#include<conio.h>
void main()
{
	int a[10],i,item;
	void binary(int x[10],int beg,int end,int y);
	clrscr();
	for(i=0;i<10;i++)
	{
		printf("enter no.:");
		scanf("%d",&a[i]);
	}
	printf("enter no. to be found:");
	scanf("%d",&item);
	binary(a,0,9,item);
	getch();
}
void binary(int x[10],int beg,int end,int y)
{
	int mid,z;
	if(beg<=end)
	{
		mid=(beg+end)/2;
		if(x[mid]==y)
		{
			printf("number found");
		}
		if(y<x[mid])
		{
			end=mid-1;
			binary(x,beg,end,y);
		}
		else
		{
			beg=mid+1;
			binary(x,beg,end,y);
		}
	}
}
jonsca commented: Did you read the rest of the thread?? -1
joshisumitnet -1 Light Poster

Hi, All Friends

Here I am showing you how to Redirect from Window Application to Web Application from VB.NET or C#.NET.

The below code is from my VB.NET application. Just copy and paste the code into your application and you will see the magic.

Private Sub sitelink_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles sitelink.LinkClicked
        Dim openBrowser As New System.Diagnostics.Process
        openBrowser.EnableRaisingEvents = False
        openBrowser.StartInfo.FileName = "iexplore"
        openBrowser.StartInfo.Arguments = http://www.themacrosoft.com"
        openBrowser.Start()
    End Sub

The above code help is retrieved from the below link. But I think that I should have to share with you all guys.
http://www.eggheadcafe.com/community/aspnet/2/10143588/how-to-redirect-user-to-i.aspx

joshisumitnet -1 Light Poster

How to unmount "d" as I have mounted it.

Please help me

Thank you

Even i faced this problem now here is the solution
Install the software DOSBox ver 0.72 ( 1.2 MB ) (Freeware) from the link below (Direct Link)

http://prdownloads.sourceforge.net/dosbox/DOSBox0.72-win32-installer.exe?download

Before going to the details u have to create a folder (any name will do). Here we name it as Turbo

Copy the TC into the Turbo folder

Run the DOSBox 0.72 from the icon located on the desktop or from the location of the installation folder

Then u are presented with two screens which look like the command prompt in Windows

Now u are presented with two screens. One with a Z prompt. U can ignore the other screen.

There type the following commands at the command prompt [Z]:

Mount [Type in any alphabet that u wish except z] [Type the source of the turbo C] press enter

Now , Type in the following commands after the Z prompt:

Z: mount d c:\Turbo\ [The folder TC is present inside the folder Turbo]

* Now u should get a message which says: Drive D is mounted as a local directory c:\Turbo\ ***

Now type d: to shift to d: prompt .

D: cd TC [The contents inside the folder Turbo gets mounted as a virtual drive (Here D drive)

D: cd Bin

D: TC or Tc.exe [This presents u the Turbo C++3.0 screen]

On the Turbo C++ goto Options>Directories>Change the source of …

joshisumitnet -1 Light Poster

My Dear Friends,

Can anybody tell me how to use Web Services using PHP?
I want to do following things in my website:
1. I want to use RSS feed in my website.
2. Want to display latest news from other sites who are providing this facility.
3. Want to show temperature from other sites.

Please make this fast as soon as possible.

I work with OOPs. So if possible please make it with class.
Thank you.

joshisumitnet -1 Light Poster

Hi, Friends.
Here is the easiest way to select multiple checkboxes and then also reading their values and make our task.

The below code is to read the checkbox array. Its self explanatory.

<?php
if(isset($_POST['submit'])) {
    if(isset($_POST['check_list'])) {
        $fields = $_POST['check_list'];
        if (is_array($fields)) {
            echo "<pre>";
            print_r($fields);
            echo "</pre>";
            foreach ($fields as $key=>$val) {
                echo "$key -> $val <br />";
            }
            $content = '<hr><br>';
            $content = $content . count($fields);
            for ($i=0;$i<count($fields);$i++) {
                $content = $content . "<li>$fields[$i]\n";
            }
            echo $content;
        }
    }
}
?>

In the below HTML and JAVASCRIPT code, nice work has been done. In JavaScript first we are finding the "check_list" array and then assigning it to out array variable and then selecting multiple checkboxes.

<html>
    <head>
        <title>CheckAll and UnCheckAll</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script LANGUAGE="JavaScript">
            function CheckAll()
            {
                var a=new Array();
                a=document.getElementsByName("check_list[]");
                //alert("Length:"+a.length);
                /*var p=0;
                for(i=0;i<a.length;i++){
                    if(a[i].checked){
                        alert(a[i].value);
                        p=1;
                    }
                }*/
                for (i = 0; i < a.length; i++)
                    a[i].checked = true ;
            }

            function UnCheckAll(chk)
            {
                var a=new Array();
                chk=document.getElementsByName("check_list[]");
                for (i = 0; i < chk.length; i++)
                    chk[i].checked = false ;
            }
        </script>
    </head>
    <body>
        <form name="myform" action="checkbox1.php" method="post">
            <b>Scripts for Web design and programming</b><br>
            <input type="checkbox" name="check_list[]" value="1">ASP<br>
            <input type="checkbox" name="check_list[]" value="2">PHP<br>
            <input type="checkbox" name="check_list[]" value="3">JavaScript<br>
            <input type="checkbox" name="check_list[]" value="4">HTML<br>
            <input type="checkbox" name="check_list[]" value="5">MySQL<br>

            <input type="button" name="Check_All" value="Check All" onClick="CheckAll();">
            <input type="button" name="Un_CheckAll" value="Uncheck All" onClick="UnCheckAll();">
            <input type="submit" name="submit" value="submit">
        </form>
    </body>
</html>

Try it. It works nice.
Cheer. :)

joshisumitnet -1 Light Poster

Just to take note that there is no Foreign key in MySQL unless your database's type is InnoDB. I assume you are using MyISAM.

Hope it helps.

Hi Friends,

I also have read in many websites that we cannot create foreign key in MyISM type database or tables. But It is possible to create foreign key in MyISM type database or tables. Here I am submitting two tables and the relationship between them using foreign key concept. So do practice in your maching also.
Two tables
1. Country
2. State

SQL for Country:
Create Table Country(Id int(2) Primary Key Not Null Auto_Increment,
CName varchar(10))

SQL for State:
Create Table State (Id int(2) Primary Key Not Null Auto_Increment,SName varchar(10),cid int(2),foreign key (cid) references country(id))

Try, it is working successfully in my machine (laptop).
Cheers :)

joshisumitnet -1 Light Poster

hai i am also new

Hi,
The below link has given the help that how to create foreign key in MySQL? Its really great help.
http://www.1keydata.com/sql/sql-foreign-key.html

Cheers :)