473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

retriving data from table and i need to insert the retrived data into another table i

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>STUDENT FORM</title> </head> <body bgcolor="#333333"> <?php
  2. $HTNO=$_POST['HTNO'];
  3. $RANK=$_POST['RANK'];
  4. $Name=$_POST['Name'];
  5. $FName=$_POST['FName'];
  6. $DOB=$_POST['DOB'];
  7. $SSC=$_POST['SSC'];
  8. $Gender=$_POST['Gender'];
  9. $Caste=$_POST['Caste'];
  10. $Region=$_POST['Region'];
  11. $Fee=$_POST['Fee'];
  12. $db=odbc_connect("masterodbc","sa","chaithu");
  13. $stmt="INSERT into reglist(HTNO,RANK,Name,FName,DOB,SSC,Gender,Caste,Region,FEE)values('".$_REQUEST['HTNO']."','".$_REQUEST['RANK']."','".$_REQUEST['Name']."','".$_REQUEST['FName']."','".$_REQUEST['DOB']."','".$_REQUEST['SSC']."','".$_REQUEST['Gender']."','".$_REQUEST['Caste']."','".$_REQUEST['Region']."','".$_REQUEST['FEE']."')";
  14. $result = odbc_do($db,$stmt);
  15. if($result)    
  16. {
  17.     echo "<script language='javascript'>\n";
  18.     echo "alert('Successfully Inserted');window.location.href='reg.php';";
  19.     echo "</script>\n";
  20. }
  21. else
  22. {
  23.     echo "<script language='javascript'>\n";
  24.     echo "alert('Not Inserted ');window.location.href='reg.php';";
  25.     echo "</script>\n";
  26. }
  27. odbc_close($db);
  28. ?> </body> </html>
Oct 28 '13 #1
0 888

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: William Case | last post by:
I cannot believe I'm having this much trouble doing such a simple thing! I have two tables with identical structure. I can use an A2K select query to show the records in table 1 that match...
0
by: EKL | last post by:
Hi, I'm making a sort of Customer and Orders database in MS Access 2003. My problem is that I wish to update the table "tblTransaction" based on changes made in the table "tblOrderDetails"....
2
by: Mark Goldin | last post by:
I have a table that is inside of a cell of another table. It seems that I cannot adjust the height of that cell. I have an extra space underneath of the internal table. ----------------------...
10
by: jaYPee | last post by:
as of now i am using a stored procedure from my sql server 2000 to insert record from another table. what i need now is on how can i insert record by not using the stored procedure and insert it...
2
by: Prabu Subroto | last post by:
Dear my friends... I created a table (named : sven1). I want to populate this table with the record from another table (named : appoinment). but I don't know how to formulate the sql query. ...
5
by: John Bokma | last post by:
I have a table A, with two ID columns. In a report both ID colums should be shown with the actual value stored in a second table, B The problem is, both IDs need to be looked up in B, but are not...
1
by: Randoz | last post by:
I recieve an updated excel file with pers information every other week and when I go to import the data into my table the data is not updated for the records that are linked to a course table. I...
1
by: zoeb | last post by:
Currently I have a table, and would like the calculate a field in the table by referencing values from another 3 tables. i.e. tblData Index1, Index2, Index3, Value 1 2 3 2...
2
by: Hillwalker | last post by:
Hi Raw recruit, no VB knowledge but some general programming experience..... Access 2000 on XP In form view, I wish to fill the field (ONLY on the record being viewed) with the maximum value...
6
by: vikvikash | last post by:
hi i have split the data using the split command now i want to insert the split data to be inserted into another table. there r many records in the previous table i want each record to be split and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.