Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8765203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:13:27+00:00 2026-06-13T16:13:27+00:00

I have two files, csform.php and process.php. Csform.php is the main page with the

  • 0

I have two files, csform.php and process.php. Csform.php is the main page with the form that a user will enter in the data and hit submit which then I have process.php and the sql connection and I want that data the user entered into the form to be inserted into the sql server database. But when submit is hit the data that is entered into the form is not inserted, the data in line 13 of the process.php file is inserted. What am I doing wrong, is doesn’t seem like I have a connection between the two files. Here is the coding I currently have:

csform.php:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSLog</title>
</head>
<h1> Customer Service Form </h1>
<form method="post" action="process.php"> 
<table width="300" border="0">
<tr>
<td> Forte ID:</td>
<td><select id="forteid" input name="forteid">                  
                <option value="user1">user1</option>
                <option value="user2">user2</option>
                <option value="user3">user3</option>
                <option value="user4">user4</option>                   
    </select></td>
 </tr>
 <tr>
 <td> Disposition</td>
 <td><select id="disposition" input name="disposition">                 
                <option value="Save">--Save--</option>
                <option value="Sale">--Sale--</option>
                <option value="LOC">--LOC--</option>                   
    </select> </td>
</tr>
</table>
<br />
<hr />        
<br /> 
<br /> 
<table width="400" border="0">
<tr>
<td>App Number:</td>
<td></td>
<td><input type="text" name="appnumber"></td>
</tr>
<tr>
<td>Finance Number:</td>
<td></td>
<td><input type="text" name = "Finance_Num"></td>
</tr>
<tr>
<td>Number Payments:</td>
<td></td>
<td><input type="text" name = "num_payments"></td>
</tr>
<tr>
<td>Ach or CC:</td>
<td></td>
<td><input type="text" name = "ach_cc"></td>
</tr>
<tr>
<td>Date:</td>
<td></td>
<td><input type="text" name = "date"></td>
</tr>
</table>
<br />
Notes: 
<br />
<textarea input name="text" id="notes" cols="45" rows="5"></textarea>
</fieldset>
<br />
<br /> 
<hr />
<br />
<br />            
<input type="submit" name="formSubmit" value="Submit">  <input type="Reset"        name="formReset" value="Reset"> 
</form> 
</head>
<body>
</body>
</html>

And then the process.php:

<?php
$serverName = 'SRB-Nick_Desktop\SQLEXPRESS';
$connectionInfo = array('Database'=>'cslogs', 'UID'=>'cslogslogin', 'PWD'=>'123456');
$connection = sqlsrv_connect($serverName, $connectionInfo);

if( $connection === false )
{
 echo "Connection could not be established.\n";
 die( print_r( sqlsrv_errors(), true));
}

$tsql = "INSERT INTO logs(ForteID, disposition, appnumber, Finance_Num, num_payments,   ach_cc, date, notes) VALUES (?,?,?,?,?,?,?,?)";
$parameters = array( "forteid", "LOC", "NCXXXXXXX4", "SRB-000004", "0", "cc", "2012-11-01", "gave LOC instructions");
$stmt = sqlsrv_query($connection, $tsql, $parameters);
if( $stmt === false ){
echo "Statement could not be executed.\n";
 die( print_r( sqlsrv_errors(), true));
} else {
echo "Rows affected: ".sqlsrv_rows_affected( $stmt )."\n";
}
/* Free statement and connection resources. */
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $connection);
?>

Hopefully someone is able to help me or steer me in the right direction on what I am doing wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:13:28+00:00Added an answer on June 13, 2026 at 4:13 pm

    csform.php

    In csform.php, the <select>‘s do not need the word input:

    Change

    <select id="forteid" input name="forteid">
    

    To

    <select id="forteid" name="forteid">
    

    process.php

    In process.php, you need to use the passed variables using $_POST[variable_name]. You are POSTing to process.php, yet not using anything from $_POST.

    You can use print_r($_POST); at the top of process.php to see what variables are being passed:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two files: index.php /lib/user.php Index contains the form: <div class=<? echo $msgclass;
I have two files 1 - index.php 2 - main.php index.php call to main.php
I have two files. main.py that has main program logic and functions.py that has
I have two files, one containing an array in PHP that is echo ed
I have two files client.php and server.php. The client file send a HTTP request
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have two files, one with webservice description (wsdl), second with data structures used
I have two files that are zipped with something like the following: for line
I have two files that I would like to compare, however they are each
I have two files that I am trying to work with. menu.py has the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.