Search found 44 matches

by sandeep605085
Tue Aug 20, 2013 11:50 am
Forum: PHP coding => General
Topic: How to Implement search option in PHP
Replies: 1
Views: 776

Re: How to Implement search option in PHP

You can create a form like <form action='get_employee_details.php' method='post'> <input type='text' name='employee_id' /> <input type='submit' name='submit' value='submit' /> </form> then when user enter the id in text box and click submit it will go to employee_detail.php and post the form values ...
by sandeep605085
Tue Aug 20, 2013 11:40 am
Forum: JavaScript
Topic: Unable to call function from after adding js file
Replies: 2
Views: 1472

Re: Unable to call function from after adding js file

Try below if that helps you. <html> <head> <script type='text/javascript'> function validate() { var req=document.forms["registration"]["comments"].value; if (req==null || req=="") { alert("no value"); return false; } else { alert(req); return false; } } </script> </head> <body> <form id="registrati...
by sandeep605085
Fri May 17, 2013 4:57 am
Forum: PHP coding => General
Topic: Trouble with forms - $_POST['']
Replies: 3
Views: 684

Re: Trouble with forms - $_POST['']

Hi, If you are trying to post the form to the same page and to get the value of the clicked linked from the posted form then the following code might help you. and also you need to include the jquery.js to your code to get $(this) to be workable. <script src='http://ajax.googleapis.com/ajax/libs/jqu...
by sandeep605085
Fri May 17, 2013 3:51 am
Forum: PHP General
Topic: How to print pdf report based on template?
Replies: 1
Views: 1303

Re: How to print pdf report based on template?

Hi,

Try http://html2pdf.fr/en/default.

This is very useful to convert html templates to PDF.
You can define header,footer, page margins, page break and many other stuffs.

Thanks,
Sandeep Agrawal
Mindfire Solutions.
by sandeep605085
Wed May 15, 2013 6:27 am
Forum: PHP coding => General
Topic: php class help
Replies: 3
Views: 743

Re: php class help

Hi, I think you have not set the values for TEMPLATE array and the key CONTENT in pending.php. check you other page where use are using $GLOBAL["TEMPLATE"]["content"] that how variable are set. These variables should be initialized out side the functions. Refer the below link for the use of GLOBAL v...
by sandeep605085
Tue May 14, 2013 12:14 pm
Forum: mySQL & php coding
Topic: Got error without warning
Replies: 0
Views: 491

Re: Got error without warning

Hi, does your code able to connect to mysql? try below code to get the error if any but you should not use this die function when you build your live site. mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($db) or die(mysql_error()); also try echoing the variable inside you...
by sandeep605085
Tue May 14, 2013 12:03 pm
Forum: PHP General
Topic: ... foreach() on line 5
Replies: 7
Views: 1458

Re: ... foreach() on line 5

Hi, Refer the php manual for foreach control structure. http://php.net/manual/en/control-structures.foreach.php below is one example: <?php foreach (array(1, 2, 3, 4) as &$value) { $value = $value * 2; } ?> So whatever you pass to foreach should be an array or object. In below your code $_GET["gusto...
by sandeep605085
Fri May 10, 2013 9:48 am
Forum: PHP coding => General
Topic: php code for finding multiple images' dpi
Replies: 1
Views: 876

Re: php code for finding multiple images' dpi

Hi, Try below. <?php function get_dpi(){ //valid image extensions (add as many image extensions you have) $pattern="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$)"; $dirname = 'd:/jpg'; if ( $handle = opendir( $dirname ) ) { //if current directory //loop through all files of the directory while ( false !== ( ...
by sandeep605085
Fri May 10, 2013 9:32 am
Forum: PHP coding => General
Topic: Insert dates into a table from html form
Replies: 7
Views: 1028

Re: Insert dates into a table from html form

Code looks fine, datatype is also fine. its amazing why not working. if you can post the output of echo "INSERT INTO admision(Registrationid,Classid,studentid,Fee,AdminNumber,Date) VALUES('','$classid','$studentid','$fee','$adminnumber','$event_date')"; and the database table structure for table adm...
by sandeep605085
Thu May 09, 2013 9:37 pm
Forum: PHP coding => General
Topic: Insert dates into a table from html form
Replies: 7
Views: 1028

Re: Insert dates into a table from html form

Hi,

Can you please post here the echo of "insert into table_name(date_field)VALUES('$event_date')";
and the database table_name structure so that i can analyse and fix it.



Thanks,
Sandeep Agrawal
Mindfire Solutions.
by sandeep605085
Thu May 09, 2013 11:27 am
Forum: PHP coding => General
Topic: Insert dates into a table from html form
Replies: 7
Views: 1028

Re: Insert dates into a table from html form

Hi, Did you try echo the $event_date value after getting it from date('Y-m-d,strtotime($event_date)); if below is your correct code $event_date=date('Y-m-d,strtotime($event_date)); then i guess the problem is because of missing single quote (') for "Y-m-d" format in date( 'Y-m-d ,strtotime($event_da...
by sandeep605085
Thu May 09, 2013 11:13 am
Forum: PHP coding => General
Topic: Need help on PHP Curl
Replies: 1
Views: 1080

Re: Need help on PHP Curl

Yes, i did run the code. Below is the modified code i ran which access only urlSecuredPage page and it created the file content_mjob1.html in the same directory which has the site content. Thought there are some issues in displaying the images but text contents are there. <?php $urlSecuredPage = 'ht...
by sandeep605085
Thu May 09, 2013 11:06 am
Forum: PHP coding => General
Topic: How can we set the password for Root in MYSQL
Replies: 1
Views: 752

Re: How can we set the password for Root in MYSQL

Hi,

open any browser and access the below url.

http://localhost/security/xamppsecurity.php

It should open a xampp security page where you can reset or set the password for Root.

Thanks,
Sandeep Agrawal
Mindfire Solution.
by sandeep605085
Wed May 08, 2013 10:50 am
Forum: PHP coding => General
Topic: Need help on PHP Curl
Replies: 1
Views: 1080

Re: Need help on PHP Curl

Hi, when your code is executed then the content_mjob1.html is created in the same directory where the contents are from the variable $data1. i guess including below code same as for second url that you did in curl is writing the data from $data variable too in that file. curl_setopt($ch, CURLOPT_FOL...
by sandeep605085
Wed May 08, 2013 10:18 am
Forum: PHP coding => General
Topic: php code for finding multiple images' dpi
Replies: 1
Views: 876

Re: php code for finding multiple images' dpi

Hi, Please check below code if this works for you. <?php function get_dpi(){ //valid image extensions (add as many image extensions you have) $pattern="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$)"; if ( $handle = opendir(".") ) { //if current directory //loop through all files of the directory while ( fals...
by sandeep605085
Wed May 08, 2013 10:03 am
Forum: PHP coding => General
Topic: How to capture local lan ip in php
Replies: 1
Views: 715

Re: How to capture local lan ip in php

Hi,

Check this

<?php
$localLanIp = gethostbyname(trim(`hostname`));
?>

Thanks,
Sandeep Agrawal
Mindfire Solutions.
by sandeep605085
Wed May 08, 2013 9:57 am
Forum: PHP coding => General
Topic: graph plot
Replies: 0
Views: 552

Re: graph plot

Hi, check if this simple tool helps you. Download phplot-6.0.0.zip from below link http://sourceforge.net/projects/phplot/?source=dlp unzip the above zip file then inside phplot directory where all code is present there create a test.php and write the below code <?php require 'phplot.php'; $plot = n...
by sandeep605085
Tue May 07, 2013 10:08 pm
Forum: PHP coding => General
Topic: Collecting weather icon
Replies: 0
Views: 694

Re: Collecting weather icon

Hi, Please check the site http://www.yr.no/sted/Norge/Sogn_og_Fjordane/Eid/Nordfjordeid/ekstern_boks_liten.html It does not contains <td class="wind" for which you are trying to get the string position from below line. $posout1 = strpos($newstring1, '<td class="wind"'); // Find the end tag of the sp...
by sandeep605085
Tue May 07, 2013 9:51 pm
Forum: PHP coding => General
Topic: How can I query Database on click of Button
Replies: 1
Views: 591

Re: How can I query Database on click of Button

Hi, In PHP you can can do like: create a hidden input tag to store the count value and pass with submitted data so that when page is refreshed then you can get the count value from submitted value of count. <input id='count' name='count' type='hidden' value='<?php $count; ?>' /> then in php code you...
by sandeep605085
Tue May 07, 2013 10:18 am
Forum: PHP coding => Images
Topic: Show only certain images
Replies: 2
Views: 4672

Re: Show only certain images

the actual error is at below line that value passed to imagecreatefromstring function is not a valid string. $img = imagecreatefromstring($results2); $result2 will return an array and as i told you that imagecreatefromstring accepts string but now you are passing array to it. $results2 = $query2->fe...
by sandeep605085
Tue May 07, 2013 6:33 am
Forum: PHP coding => Images
Topic: Show only certain images
Replies: 2
Views: 4672

Re: Show only certain images

Please check at below line $img = imagecreatefromstring($results2->img); try echo $results2->img; and check that if it is giving a blank value or any thing other than string as "imagecreatefromstring" accepts a string containing the image data. then $height = $imagesy($img); is $imagesy is a functio...
by sandeep605085
Tue May 07, 2013 6:25 am
Forum: PHP Installation
Topic: problem with installation! help!
Replies: 0
Views: 977

Re: problem with installation! help!

Hi, There are view blog/sites which has good explanation about installation that might help you: Operating system window: 1. http://connectwww.com/how-to-install-and-configure-apachephpmysql-and-phpmyadmin-on-windows/457/ 2. http://www.techrepublic.com/article/how-do-i-install-configure-and-integrat...
by sandeep605085
Mon May 06, 2013 9:16 am
Forum: PHP coding => General
Topic: PHP error column issue
Replies: 7
Views: 1279

Re: PHP error column issue

By looking at screen shot it looks like only 24 column is present in that table but your sql query is inserting 42 record in that table. Looking at the column name and PHP variable in your sql query i am able to identify the column name with respective value. in below comparison of column name and v...
by sandeep605085
Mon May 06, 2013 4:55 am
Forum: PHP coding => Images
Topic: Show only certain images
Replies: 2
Views: 4672

Re: Show only certain images

Hi, I guess there is a problem in executing either of the below sql query. "SELECT * FROM `cardId` WHERE `status` = '1' ORDER BY `id` ASC LIMIT 10 "; "SELECT * FROM `images` WHERE `cid` = '$row->id'"; please echo the query and check it by running it directly from mysql command line or mysql query br...