473,383 Members | 1,862 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.

Insert record using a var - basic question :(

Hallo,

i need to insert in the 'MarcaLinea_Pdf' field the value of the var
'recordID' sent from a page ( insert_pdf.php?recordID=14)

it's easy, i know, but...

Also, how to Printout the value of recordID ?

The insert code is as follows:

$insertSQL = sprintf("INSERT INTO pdf (ID_PDF, MarcaLinea_Pdf,
NomePdf, Pdf_icona, Pdf_Doc) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['ID_PDF'], "int"),
GetSQLValueString($_POST['MarcaLinea_Pdf'],
"int"),
GetSQLValueString($_POST['NomePdf'], "text"),
GetSQLValueString($_POST['Pdf_icona'], "text"),
GetSQLValueString($_POST['Pdf_Doc'], "text"));

mysql_select_db($database_Conn_Bianchi, $Conn_Bianchi);
$Result1 = mysql_query($insertSQL, $Conn_Bianchi) or
die(mysql_error());

Thank you
Nov 27 '07 #1
3 1479
..oO(ni********@gmail.com)
>i need to insert in the 'MarcaLinea_Pdf' field the value of the var
'recordID' sent from a page ( insert_pdf.php?recordID=14)

it's easy, i know, but...

Also, how to Printout the value of recordID ?
$_GET['recordID']

Micha
Nov 27 '07 #2
On 27 Nov, 13:00, Michael Fesser <neti...@gmx.dewrote:
.oO(nicemot...@gmail.com)
i need to insert in the 'MarcaLinea_Pdf' field the value of the var
'recordID' sent from a page ( insert_pdf.php?recordID=14)
it's easy, i know, but...
Also, how to Printout the value of recordID ?

$_GET['recordID']

Micha
Yah :((

dunno why before didn't work

Tks a lot, nik
Nov 27 '07 #3
..oO(Michael Martinek)
>dunno why before didn't work

Tks a lot, nik

If the page is submitted with a POST method, then your values will be
available in $_POST. If it's submitted with a GET, or blank method
then the values will be available in $_GET.
The 'action' URL in a POST form may also contain a query string, so the
script would receive both GET and POST data.
>In most cases, you can
just use $_REQUEST, which will access $_GET, $_POST, $_COOKIE globals.
In most cases using $_REQUEST is a really bad idea, since you don't know
where your data is coming from.

If you expect a URL parameter, use $_GET. If you want to access a cookie
value, use $_COOKIE etc. $_REQUEST is useful only in very rare cases.

Micha
Nov 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
2
by: Bill | last post by:
I'm having what seems to me to be an odd problem. Perhaps there is some explanation, but don't know at this point. Basically I have a form that tracks memberships and donations. The main form...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
5
by: Louis LeBlanc | last post by:
Hey folks. I'm new to the list, and not quite what you'd call a DB Guru, so please be patient with me. I'm afraid the lead up here is a bit verbose . . . I am working on an application that...
7
by: Cindy H | last post by:
Hi I'm having a problem getting the insert statement correct for an Access table I'm using. The Access table uses an autonumber for the primary key. I have tried this: INSERT INTO Tournaments...
4
by: unwantedspam | last post by:
Hi All, Thank you in advance. I am trying to insert into two tables but I am getting the following error: "You cannot add or change a record because a related record is required in table..." I am...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
6
by: eighthman11 | last post by:
Hi everyone: Using Sql Server SQL 8 I'm trying to INSERT records into a "can software package" batch table. I have a work-table that mimics the batch table. After manipulating the records in...
8
by: SaltyBoat | last post by:
Needing to import and parse data from a large PDF file into an Access 2002 table: I start by converted the PDF file to a html file. Then I read this html text file, line by line, into a table...
17
geolemon
by: geolemon | last post by:
This should be an easy one for anyone with basic forms experience (I'd hate for you guys to be bored!) :D I have a simple form, bound to a single table. I'd *like* the form to work this way:...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.