Jump to content


Photo

Insert data via a url


  • Please log in to reply
2 replies to this topic

#1 Xoplex

Xoplex
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 11 November 2003 - 10:43 PM

Hi,

I have an access database that grabs data from various forms that we submit. It stores the data in a url format. Is there a way to imput the url into my mysql database via a url?
A script of some sorts that will preform the insert based on url instead of relying on a form?


Partial example of output:
identify=DIRECT&key=548&CONFIRMATION=FB2BP-
6J2BP&AGENT=Sylvia&HotelAgent=Joan&HOTEL=Borgata&
ROOM=Classic20Fiore&ARRIVAL=11/15/03&Departure=11/17/03&
ADULTS=2&NumberOfRooms=1&CHILDREN=0&RatePerRoom=674.00&NI
GHTS=2&bGaveIATA=1&bSentConfirmation=&CANCELNO=&CancelDate=
&CANCELWITH=&CancelAgent=&Smoking=0

#2 DylanBlitz

DylanBlitz
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationOC Baby!

Posted 12 November 2003 - 08:27 AM

you could just use get to pull the data from the url and assign it to variables then insert that into the database.

#3 chelsea7

chelsea7
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 17 November 2003 - 06:55 PM

If you know the path of the data you want to retrieve, you could do something like to one below;

$uploaddir = \'c:/mysql/data/login/images/\'.$yourfield;

mysql_select_db(\"mylogin\",$connect);

$sql = \"INSERT INTO `your table` ( `imagefilepath`,`objTxtArea`,) VALUES (\'\" . $uploaddir. \"\',\'\".$synop.\"\',curdate())\";

This is part of a code I did. I wanted the user to upload a file which is stored in a directory. Then the path for that file would be stored in the mysql table.

This way when reading the table, it will point to that path and display the file.

Chelsea
Do it where it counts!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users