Download New Sharecodepoint Android App from Google Play Store : DocScannerPoint : Document Scanner with OCR, PDF: Download Now - programming homework help. Get your programming homework done with expert homework helper. Trust with your paper and you will never regret it.

Download Latest Notes, Study Materials and More...

Visit: Download Now

Ask Any Question Relative to your Sujbect

Visit: Ask Question

How can I know which radio button is selected via jQuery?

How can I know which radio button is selected via jQuery?

To get the value of the selected radioName item of a form with id myForm:

Here's an example:

$('#myForm input').on('change', function() {
   alert($('input[name=radioName]:checked', '#myForm').val()); 
<script src=""></script>
<form id="myForm">
  <input type="radio" name="radioName" value="1" /> 1 <br />
  <input type="radio" name="radioName" value="2" /> 2 <br />
  <input type="radio" name="radioName" value="3" /> 3 <br />

File Handling in PHP

File Handling in PHP
In any web application, file handling plays a very important role. For different processes, we need to open and process the file. For creating, reading, uploading files, there are many functions in PHP. Any kind of manipulation in the file can be done in a very careful manner. Sometimes files could be deleted or accidentally code gets deleted in some working file, the hard drive could be filled with garbage data, the wrong file chosen for working, etc. likewise many critical situations can occur while handling the file. Therefore file handling is always done carefully.

In PHP there is a read file() function defined for reading a file.

1. fopen() function is used to open a file. The fopen() function defined with two parameters.

$file = fopen("file.txt",'w');

The first parameter in fopen() function is the name of the specified file and the second parameter is the mode for the particular file either read (r) or write (w).

Write mode modify the content of the existing file or it can be used to create the file for the same name if the file does not exist.
  • The (a) mode is used to write the content at the last of the page. The existing file is not deleted. The content can be added from last and the new file is created if the file does not exist.
  • The (x) mode used to write the file but if the file does not exist then it returns false as an error.
  • The (r+) command is used to read/write mode.
  • The (w+) mode is used for write/ read mode and through this content can be modified or deleted. read() function is used to read from an open file.

2. fclose() function is used for closing an open file. For the good developer, it is always recommended that the file must close first after completing the work on the same file.

$file = fopen("file.txt", 'r');

 If we want to read a single line from a file then we use fgets() function.

After calling fget() function, the pointer points to the next line and the process must go on.

The feof() function plays the role when the end of file is reached. It plays an important role in looping.

The fgetc() function is used to read the character from a file.

After calling the fgetc() function for one character then it points to the next character.

PHP is a very easy language and has very many useful functions. By using these functions we can be handling the PHP file easily and efficiently. Therefore File handling in PHP is very beneficial and necessary.

This article is contributed by Aayushi. If you like Sharecodepoint and would like to contribute, you can also write an article using or mail your article to sharecodepoint@gmail. See your article appearing on the sharecodepoint main page and help another programmer.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Difference between GET and POST method in PHP

Difference between GET and POST method in PHP

GET & POST methods are superglobals which means they can easily access from any place anywhere. Get and Post method are very useful methods for form handling. Most of the developers prefer POST for sending form data. GET and POST, both methods are creating an array with key and value pairs. The name in the array is the form control field name the value is the entered data by the user.

GET & POST methods both are used as $_GET and $_POST. As they both are not required scope for their accessibility. We can access these methods anywhere in any function, any class or file as we do not need to do any functionality for the same.

If we simply say about $_GET is none other than an array of variables passed to script which is executing on that time via URL parameters.

The HTTP POST method is used in $_POST which is also an array of variables. When using Get method in form submission then the user information either names or values) is visible in URL to everyone. Get also has some specified limits of only 2000 characters i.e. it can send form data only within particular limits.

In GET it is possible to bookmark the page, as data is shown in  URL which is beneficial in some cases. GEt is always used for sending the data which is not private. As there is no security in getting because everything is displayed in URL. Hence sometimes we avoid Get while sending passwords and other private information.

On the other hand, information while sending with the POST method is not visible to the users. So, it is more secure than GET method.

 In the POST method, all the names and values are embedded in the HTTP request, as it is not visible to others. There is no specified limit for sending data. We can send an unlimited amount of characters while sending form data through the POST method.

As compared to the GET method POST supports advanced functionality.

In POST, while uploading files to the server it supports multi-part binary input. In the post, it is not possible to bookmark the page.

 In short, the secure method is the POST method for sending form data in comparison to the GET method.

Jobs, Events, Companies, Recruitment, Employment, Job Portal Website in PHP & MySQL

Jobs, Events, Companies, Recruitment,  Employment, Job Portal Website in PHP & MySQL
Fastjob  allows you to manage categories and job listings, event, companies and etc. Fastjob provides advanced search, front-end forms for job and resume submission.

Features FastJob :

Post a Job
  • Post a job in easy steps and start receiving applications the same day.
  • Save time and receive most relevant responses using our intelligent filter technology.
  • Post unlimited free jobs.
  • Fill the form and start getting quality applications in your inbox within an hour.
  • Independent & specialized Job Posting solutions (Full Time/Contract/Walk-In) for all hiring needs.
  • Select the type of job posting as per your need.

Manage Responses
  • Create your very own centralized database of responses, accessible from anywhere.
  • Shortlisting made easier. See the most relevant resumes first.
  • Get unlimited responses.
  • Efficient and cost-effective way to manage responses online.
  • Online database for searching resumes.
  • Hire the right, relevant candidates almost instantly through
  • Innovative recruitment solutions now on the mobile.

Registered Job-seeker Benefits
  • Get Jobs regularly in your inbox.
  • Thousands of recruiters search our database daily to find candidates. Get found by them.
  • Apply in one click to more than 10,000 jobs*.
  • Get contacted by over 5,000 Recruiters.
  • Follow Companies that can hire you.
  • Ask any query from experts
  • Search for current as well as old events.
  • Post unlimited events

Screen Shots of Main Page 

Build your network
Find out where your friends work or who works at a better company and get directly introduced by one of your network contact.

Find your dream company or let it find you
Expand your network significantly and create more work opportunities by following companies and discussions on various topics that you are interested in.

Stay on top of your career
Showcase your work experience, but more important, your work achievements and recommendations from your work colleagues and clients.

Buy Minaukri Website :

Send Email In PHP using PHP Function, Simple E-Mail and Mail Form

Send Email In PHP using PHP Function, Simple E-Mail and Mail Form
Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demonstrate how to generate and send emails in PHP.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email.

Note that to send email with PHP you need a working email server that you have permission to use: for Unix machines, this is often Sendmail; for Windows machines, you must set the SMTP directive in your php in file to point to your email server.

PHP allows you to send e-mails directly from a script.

The PHP mail() Function 
The PHP mail() function is used to send emails from inside a script.

mail(to, subject, message, headers, parameters)

toRequired. Specifies the receiver / receivers of the email
subjectRequired. Specifies the subject of the email.
Note: This parameter cannot contain any newline characters
messageRequired. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters
headersOptional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n)
parametersOptional. Specifies an additional parameter to the sendmail program
Note: For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php in file.

PHP Simple E-Mail
The simplest way to send an email with PHP is to send a text email.
In the example below we first declare the variables ($to, $subject, $message, $from, $headers), then we use the variables in the mail() function to send an e-mail:
$to = "";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "";
$headers = "From:" . $from;
echo "Mail Sent.";
echo "Unable to send email";
PHP Mail Form
With PHP, you can create a feedback-form on your website. The example below sends a text message to a specified e-mail address:

if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  //send email
  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail("", $subject,
  $message, "From:" . $email);
  echo "Thank you for using our mail form";
//if "email" is not filled out, display the form
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text'><br>
  Subject: <input name='subject' type='text'><br>
  <textarea name='message' rows='15' cols='40'>
  <input type='submit'>

This is how the example above works:
  • First, check if the email input field is filled out
  • If it is not set (like when the page is first visited); output the HTML form
  • If it is set (after the form is filled out); send the email from the form
  • When submit is pressed after the form is filled out, the page reloads, sees that the email input is set, and sends the email

Note: This is the simplest way to send e-mail, but it is not secure.
About Developer
Sandeep Singh
I am Programmer and I love to implementing new ideas in the workplace