Click here to Skip to main content
15,302,210 members

Comments by Pankaj Mahor (Top 92 by date)

Pankaj Mahor 10-Mar-17 3:14am View
thanks but default is happening when i submit form again not when i close dialog window so its not working.
Pankaj Mahor 18-Sep-14 13:33pm View
Anybody here?
Pankaj Mahor 13-Sep-14 10:22am View
Both tables have data. Here i have only posted a question of my problem not my whole php code.
Pankaj Mahor 13-Sep-14 9:29am View
not working
Pankaj Mahor 2-Aug-14 22:59pm View
Yes, its system32 folder.
Pankaj Mahor 23-Jul-14 2:13am View
Pankaj Mahor 23-Jun-14 13:30pm View
my embedded file path is like myapp.file.txt. How to use it with file.exists()?
Pankaj Mahor 23-Jun-14 13:28pm View
But my embedded file path is like myapp.file.txt. How to use it with file.exists()?
Pankaj Mahor 22-Jun-14 12:37pm View
Thanx but where to put embedded text file path?
Pankaj Mahor 22-Jun-14 1:41am View
It still not copy in a number sequence. Any other way plz.
Pankaj Mahor 21-Jun-14 11:02am View
Thanx it helped.
Pankaj Mahor 21-Jun-14 10:30am View
Can plz u provide code?
Pankaj Mahor 21-Jun-14 9:52am View
I want to copy embedded text file to another location like c: drive or any location on a computer system in a number sequence like myfile1.txt, myfile2.txt...
Pankaj Mahor 20-Jun-14 15:49pm View
I have already check it but still no success. I cant undestand what i should write in place of source file path because the file is embedded?
Pankaj Mahor 20-Jun-14 12:22pm View
One more question, how can i use this code for embedded text file as a source file?
Pankaj Mahor 14-Apr-14 21:29pm View
I cant deploy it. Targetserverurl not working.
Pankaj Mahor 14-Apr-14 10:14am View
Pankaj Mahor 28-Mar-14 22:03pm View
Plz anybody help.
Pankaj Mahor 27-Feb-14 8:22am View
still user is not automatically logged in. Any other way?
Pankaj Mahor 25-Jan-14 1:32am View
but how to place a close button?
Pankaj Mahor 23-Jan-14 5:06am View
Pankaj Mahor 23-Jan-14 2:38am View
Sorry my mistake, it is html content with <p> element under <noscript> tag. What i want is- user will be able to hide it or close it if that user dont want to enable javascript in his browser. How can i do it?
Pankaj Mahor 22-Jan-14 10:42am View
Can u give me a example?
Pankaj Mahor 15-Jan-14 9:16am View
any solution plz.... i m tired searching in google...
Pankaj Mahor 15-Jan-14 8:15am View
Here code:


// find out how many rows are in the table
$sql01 = mysql_query("SELECT COUNT(*) FROM pm,pm_reply");

//$result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);
$r = mysql_fetch_row($sql01);

$numrows = $r[0];


//echo $numrows;
// number of rows to show per page
$rowsperpage = 3;
// find out total pages
$totalpages = ceil($numrows / $rowsperpage);

// get the current page or set a default
if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage']))
// cast var as int
$currentpage = (int) $_GET['currentpage'];
// default page num
$currentpage = 1;
} // end if

// if current page is greater than total pages...
if ($currentpage > $totalpages) {

// set current page to last page
$currentpage = $totalpages;
} // end if
// if current page is less than first page...
if ($currentpage < 1) {
// set current page to first page
$currentpage = 1;
} // end if

// the offset of the list, based on current page
$offset = ($currentpage - 1) * $rowsperpage;

// get the info from the db

// while there are rows to be fetched...

$sql=mysql_query("select *from pm where send_to='$_GET[name]' limit $offset, $rowsperpage");
$sql2=mysql_query("select *from pm_reply where send_to='$_GET[name]' limit $offset, $rowsperpage");

echo "<ol>";
//echo "<li><p>$rows[subject]   From: $rows[send_by]</p></li>";
echo"<li>From: $rows[send_by]<br><br>$rows[subject]</li>";
echo "
echo "<br>";
//echo "<li><p>$rows[subject]   From: $rows[send_by]</p></li>";
echo"<li>From: $rows2[replied_by]<br><br>$rows2[subject]</li>";
echo "
echo "<br>";
echo "</ol>";

echo "</div>";
//End Div Content

echo "<div style='clear:both;'></div>";
echo "<br>";
echo "<br>";
echo "<br>";

echo "<div id='pagelinks'>";
/****** build the pagination links ******/
// range of num links to show
$range = 3;

// if not on page 1, don't show back links
if ($currentpage > 1)
// show << link to go back to page 1
echo " First... ";
// get previous page num
$prevpage = $currentpage - 1;
// show < link to go back to 1 page
//echo " <</a> ";
} // end if

// loop to show links to range of pages around current page
for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++)
// if it's a valid page number...
if (($x > 0) && ($x <= $totalpages))
// if we're on current page...
if ($x == $currentpage)
// 'highlight' it but don't make a link
echo " [$x] ";
// if not current page...
// make it a link
echo "
$x ";
} // end else
} // end if
} // end for

// if not on last page, show forward and last page links
if ($currentpage != $totalpages)
// get next page
$nextpage = $currentpage + 1;
// echo forward link for next page
//echo " > ";
// echo forward link for lastpage
echo "
Pankaj Mahor 15-Jan-14 6:15am View
Anybody please give me a solution...
Pankaj Mahor 7-Nov-13 1:10am View
Thanx for the link, it helped me.
Pankaj Mahor 7-Nov-13 1:09am View
Yes, i have exactly this problem.
Pankaj Mahor 7-Nov-13 1:06am View
I have id column with primary key and auto increment. If i delete a row and then insert a new record, it is then incrementing like 1, 2,..10, 12,13...
Pankaj Mahor 7-Nov-13 0:52am View
Pankaj Mahor 27-Oct-13 13:51pm View
Thanx, i will try to understand your solution.
Pankaj Mahor 7-Oct-13 6:10am View
I have already described my problem but still no solution.
Pankaj Mahor 7-Oct-13 4:16am View
Anybody plz help.
Pankaj Mahor 7-Oct-13 3:49am View
i mean, i want to store password to table with md5 and show it back to the user without md5. How to do it?
Pankaj Mahor 7-Oct-13 2:30am View
i just want to show password without decrypt it.
Pankaj Mahor 7-Oct-13 2:08am View
Can u plz give me simple solution?
Pankaj Mahor 21-Sep-13 21:19pm View
Actually, i am tring to understand what technique they use to display number of of posts and replies in forumTest.php(see above link)? Thats why i want to use just one category 'microsoft word' to understand it step by step. Can u plz tell me the technique from given link?
Pankaj Mahor 21-Sep-13 13:53pm View
Ok then what should i write?
Pankaj Mahor 21-Sep-13 12:09pm View
how to improve?
Pankaj Mahor 21-Sep-13 9:58am View
Yes i want to do it myself. Any other options please?
Pankaj Mahor 16-Sep-13 5:01am View
whats this?
Pankaj Mahor 15-Sep-13 15:51pm View
Yes, i m not using where clause because i cant find a way to identify topic.
Pankaj Mahor 15-Sep-13 14:18pm View
Can you plz provide code example?
Pankaj Mahor 14-Sep-13 5:17am View
Any other solution please?
Pankaj Mahor 24-Aug-13 13:50pm View
Please reply.
Pankaj Mahor 24-Aug-13 13:01pm View
ok, here is my config.php(private page)-

session_start(); //Start Session
// username and password sent from form

$remember =$_POST["remm"];
//$dt=date("y/m/d h:i:s");

// Connecting Database

$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="dbsite"; // Database name
$tbl_name="users"; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password");
$sql="select *from $tbl_name where username='$myusername' and password='$mypassword'";
// Mysql_num_row is counting table row


// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1) // we can use $count>0 also.
//$myquery="update users set datetime=now() where username='$_SESSION[myvaruser]' and password='$_SESSION[myvarpass]'";

setcookie ('cookuser',$myusername, time()+60*60*24*30,"/");
setcookie ('cookpass',$mypassword, time()+60*60*24*30,"/");

//$setone="update users set checkcookie='1' where username='$_SESSION[myvaruser]' and password='$_SESSION[myvarpass]'";

echo "Wrong Username or Password";


And home.php-


<body bgcolor="gray">Logout

Welcome To Home!

<form style="position:absolute; top:100px;"method="post" action="settings.php">
<input type="text" name="txt" value=""/>
<input type="submit" name="sub" value="click"/>

Pankaj Mahor 24-Aug-13 12:23pm View
I have already tried it but whenever i click login button, private page shows welcome:username.
Pankaj Mahor 22-Aug-13 9:26am View
Problem solved, thanx.
Pankaj Mahor 30-Jul-13 13:56pm View
Ok dont tell me code but u can give me any hint or resoure sothat i could code it myself. Thanx
Pankaj Mahor 29-Jul-13 2:16am View
useless forum. Tell me how i can delete my account from this forum?
Pankaj Mahor 28-Jul-13 11:51am View
i want to become a software engineer in future and hence i am trying to know how software works behind the scene. I think u dont know answers of my questions so why r u reading my questions. Plz go away and let the other programmers to solve my problems. Now plz ban me only if u think my questions r useless and this forum is not for helping programmers.
Pankaj Mahor 28-Jul-13 10:24am View
Reply plz
Pankaj Mahor 26-Jul-13 7:44am View
I have still not got success. Please give some code.
Pankaj Mahor 24-Jul-13 14:02pm View
Thanx, very helpful.
Pankaj Mahor 24-Jul-13 2:58am View
Anybody please reply.
Pankaj Mahor 23-Jul-13 10:56am View
i need a way to use user profile provider in windows application in Now i think its clear what i want to do. Thanx
Pankaj Mahor 23-Jul-13 9:30am View
but how to do it?
Pankaj Mahor 23-Jul-13 8:25am View
I mean when an user login, a homepage form will be display. In other words, only logged in users will be able to access homepage form. I have placed a textbox and a button controls on this homepage form and if that user write something to this textbox and then click the button, the textbox value should save it. Now if that user close the application and then login again, he/she should be able to see what he/she has written in the textbox when last logged in.
Pankaj Mahor 1-Jul-13 8:47am View
Pankaj Mahor 1-Jul-13 5:52am View
Any other way?
Pankaj Mahor 1-Jul-13 5:35am View
sorry, my mistake, its hard disk drive.
Pankaj Mahor 1-Jul-13 5:02am View
Hurray, code working greate. Thanx once again.
Pankaj Mahor 30-Jun-13 11:02am View
Ok, here is the details- first i have created a windows application in On the form, i have placed a textbox1 control which is assigned with openfiledialog1 control to browse for the file(source file) (named test.txt), and then placed a another textbox2 control on the form which is assigned with folderbrowser control to browse for the destination path (where test.txt will be copied). I also place a button control when it clicked, the test.txt file should be copied to the specified destination path. Please note that i also placed two other button controls-one is for textbox1(when clicked, openfiledialog will appear) and second is for textbox2(when clicked, folder browser window will appear). Now plz tell me if you want any other info.
Pankaj Mahor 30-Jun-13 9:38am View
Thanx a lot for the code. But as i said, i am using two textboxes. How can i use your code with textboxes?
Pankaj Mahor 30-Jun-13 6:22am View
Ok, i have checked that link and its so complicated code. Can you plz give me any other code to do it easily? I need to rename file and add number to filename like mytext1.txt, mytext2.txt. Plz help.
Pankaj Mahor 30-Jun-13 5:23am View
Thanx for the info. I did not notice it. Now plz tell me how to do it in windows application?
Pankaj Mahor 30-Jun-13 4:59am View
Because it is in the post in that link. And its a windows application.
Pankaj Mahor 30-Jun-13 0:04am View
Plz reply.
Pankaj Mahor 29-Jun-13 10:18am View
Here is the link that describe what i want to do but problem is i am getting error on fileupload stament-
Pankaj Mahor 29-Jun-13 6:43am View
I already have a file and i am using two textboxes one to get source file and second to place file on a destination folder. I cant understand your code. Plz give any other solution.
Pankaj Mahor 28-Jun-13 11:58am View
How to use it?
Pankaj Mahor 28-Jun-13 11:24am View
Any other way to do it?
Pankaj Mahor 3-Jun-13 6:40am View
On google, i found i have to use user profiles like in but dont know how to do it in windows form application. I can only use Settings.setting but i want to save it to sql server database. Please help...
Pankaj Mahor 23-May-13 6:23am View
ok, Suppose i store text to database. Now how to identify which user logged in?
Pankaj Mahor 23-May-13 6:20am View
No, i dont know how to save text to database.
Pankaj Mahor 22-May-13 7:21am View
But how to store text in database?
Pankaj Mahor 20-May-13 14:53pm View
Yes, it is for all users and i want to track each user but i dont know how to do it in Thanx for reply.
Pankaj Mahor 19-May-13 13:25pm View
I found i have to use static variable like session to store loggedin user details. Plz tell me how to do that?
Pankaj Mahor 14-May-13 23:38pm View
I just want to save what each user has written to the textbox after login. I dont want to display same text to all users. Need help...
Pankaj Mahor 7-May-13 11:03am View
After viewing youtube tutorials, i have found that they are using sql server management studio to create database and i am using to create it. Is this make any difference. I can easily do this in but not working in Do i also have to use management studio? Plz reply...
Pankaj Mahor 6-May-13 8:11am View
And when i run code without try catch, i get this error-
An explicit value for the identity column in table 'Users' can only be specified when a column list is used and IDENTITY_INSERT is ON.
Pankaj Mahor 6-May-13 8:05am View
Thanx but when i run it throws error which i have set it in try catch? Now what to do?
Pankaj Mahor 6-May-13 7:45am View
I have not touch management studio. I am doing it only in like creating db, getting connection string all in
Pankaj Mahor 6-May-13 7:41am View
Ok so how to add data to all columns.
Pankaj Mahor 6-May-13 7:21am View
I have already installed management studio and can connect easily.
Pankaj Mahor 6-May-13 7:04am View
Yes, UserID is a primary key and i just want to add value to Name column not UserID.
Pankaj Mahor 6-May-13 6:46am View
I am trying to insert textbox value to only one column 'Name'.
Pankaj Mahor 6-May-13 6:12am View
One table named 'Users' and two columms named 'UserID' and 'Name'.
Pankaj Mahor 6-May-13 5:29am View
Tried, same problem- no error and empty table.
Pankaj Mahor 6-May-13 4:56am View
Ok after put breakpoint how to inspect .mdf file?
Pankaj Mahor 6-May-13 3:58am View
I have not created database in sql management studio. I created it in by adding new item to project and selected a service based database (.mdf) file.
Pankaj Mahor 5-May-13 23:39pm View
I tried it also but still same problem.