[PHP-DB] Execute a mySql sript file directly from PHP

2003-06-10 Thread Gustavo Del Castillo Meza
Hi,
I need to execute a very large script file on my hosting server, i dont
have shell access and the file is too large to execute using phpMyAdmin. I
wonder if i could upload the file by FTP and then execute it with a php
script directly, without opening the file and go thru every line.





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Permission Denied; Upload

2003-04-04 Thread Gustavo Del Castillo Meza
You need to give the user permission to write in the destination directory,
you can do this by using:
 chmod 666 directoryname


John [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
Thanking in advance,

Hi all- very new to php, and at the risk of being spoon fed here, I beg
for your patience in advance.  I am trying to have an entry page for user
input/ pic upload into MySQL/win2k (www.sammiesmodels.com/entry.php ).

I get this error during test of the above page:  Warning: Unable to open ''
for reading: Permission denied in C:\SammiWWW\entry.php on line 27 Couldn't
copy the file!

The upload folder, Temp sits in the root www dir, and the user has all
permissions granted (or do i?) in the DB.  Below is the syntax to the
Entry page:

***
html
head
titlePortfolio Entry /title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FFEBEB
?php
if ($submit) {

  $db=mysql_connect(66.220.69.20,admin,snoddy);
  mysql_select_db(sammies models,$db);
  $sql=INSERT INTO models (first, last, age, email, location, eye, hair,
experience, aspirations, mtype, picname1, picname2, picname3, picname4,
picname5, picname6, picname7, picname8)
  VALUES
('$first','$last','$age','$email','$location','$eye','$hair','$experience','
$aspirations','$mtype','$picname1','$picname2','$picname3','$picname4','$pic
name5','$picname6','$picname7','$picname8');
  mysql_query($sql) or die(mysql_error());

// if $_FILES['img1'] isn't empty, try to copy the file
if ($_FILES['picname1'] != ) {

 // copy the file to a directory or
 file://die and print an error message

 // NOTE! if you're on a Windows machine,
 // use Windows pathnames, like so:
 // copy($_FILES[picname1][$first],
C:\\sammiwww\\directory\\path\\.$_POST[img1_name]);

 copy($_FILES['picname1']['$first . temp'],
C:\\sammiwww\\upload\\.$_FILES['picname1']['$first'])
  or die(Couldn't copy the file!);

} else {

 // if $_FILES['picname1'] was empty, die and let us know why
 die(No input file specified);

}

?


echo First: $firstbr\n;
echo Last: $lastbr\n;
echo Age: $agebr\n;
echo Email: $emailbr\n;
echo Location: $locationbr\n;
 echo Eye color: $eyebr\n;
 echo Hair color: $hairbr\n;
 echo Experience: $experiencebr\n;
 echo Aspirations: $aspirationsbr\n;
 echo Media Type: $mtypebr\n;
 echo Photo 1: $picname1br\n;
 echo img src=c:/sammiwww/pic/$picname1br\n;
 echo Photo 2: $picname2br\n;
 echo img src=c:/sammiwww/pic/$picname2br\n;
echo Photo 3: $picname3br\n;
 echo img src=c:/sammiwww/pic/$picname3br\n;
echo Photo 4: $picname4br\n;
 echo img src=c:/sammiwww/pic/$picname4br\n;
echo Photo 5: $picname5br\n;
 echo img src=c:/sammiwww/pic/$picname5br\n;
 echo Photo 6: $picname6br\n;
 echo img src=c:/sammiwww/pic/$picname6br\n;
 echo Photo 7: $picname7br\n;
 echo img src=c:/sammiwww/pic/$picname7br\n;
 echo Photo 8: $picname8br\n;
echo img src=c:/sammiwww/pic/$picname8br\n;
  echo  bcenterThank you for registering,nbsp; $first
/b/centerp;
 ?
 pcenter/p
center
a href=http://www.sammiesmodels.com; target=_selfReturn to Sammies
Models
Home/a
? }
   // display form
else {
  ?
/center
center
font face=Georgia, Times New Roman, Times, serifstrongSubmit Your
Portfolio
Here:/strong/font
/center
form enctype=multipart/form-data name=entry method=POST action=?php
echo $PHP_SELF?
nbsp;
table width=95% border=0 cellspacing=0 cellpadding=0
tr
td width=14%strongFirst Name:/strong/td
td width=43%input name=first type=text size=30
maxlength=45/td
td width=43%font size=2 face=Arial, Helvetica,
sans-serifnbsp;/font/td
/tr
tr
tdstrongLast Name: /strong/td
tdinput name=last type=text size=30 maxlength=45/td
tdfont size=2 face=Arial, Helvetica, sans-serifstrong*Last name
shall
not be used on the website, but/strong/font/td
/tr
tr
tdstrongAge:/strong/td
tdinput name=age type=text size=30 maxlength=3/td
tdfont size=2 face=Arial, Helvetica, sans-serifstrongfor internal
use
only./strong/font/td
/tr
tr
tdstrongEmail:/strong/td
tdinput name=email type=text  size=30 maxlength=45/td
tdfont size=2 face=Arial, Helvetica, sans-serifnbsp;/font/td
/tr
tr
tdstrongLocation:/strong/td
tdinput name=location type=text id=location size=30
maxlength=60/td
tdfont size=2 face=Arial, Helvetica, sans-serifstrong*Location-
please
do not be specific, but only/strong/font/td
/tr
tr
tdstrongEye Color/strong/td
tdinput name=eye type=text id=eye size=30 maxlength=45/td
tdfont size=2 face=Arial, Helvetica, sans-serifstrongstate or
region./strong/font/td
/tr
tr
tdstrongHair Color:/strong/td
tdinput name=hair type=text id=hair size=30 maxlength=45/td
tdfont size=2 face=Arial, Helvetica, sans-serifnbsp;/font/td
/tr
tr
td valign=topstrongExperience:/strong/td
tdtextarea name=experience cols=60 rows=10
id=experience/textarea/td
td valign=topfont size=2 face=Arial, Helvetica,
sans-serifstrong*
Any experience pertaining to your talent aspirations- school plays,
photoshoots,
etc../strong/font/td
/tr
tr
td 

[PHP-DB] Re: Database Design Help

2003-04-01 Thread Gustavo Del Castillo Meza
The easiest way to deal with this is to add a TEXT field to the end of the
Booking table and
have the user put in there all the extra data they need.
If this doesnt resolve your problem you could add an etra table called
extraData or something like that it may look like this:

extraData:

PK  extraData_ID
FK  Booking_ID
   Description   Here you describe the data to be captured Ej.
Location
   Data-And here the actual data Ej. Quebec

This way you can capture N records of extra data for the booking

Shaun [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 the data colleccted at each booking will be the fields set by an
 administrator that he/she feels are appropriate to collect for that
project.


 Gustavo Del Castillo Meza [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  What kind of data do you need to collect at each booking?
 
  Shaun [EMAIL PROTECTED] escribió en el mensaje
  news:[EMAIL PROTECTED]
   Hi,
  
   I am creating a database for a web application. The idea for the
  application
   is for a company administrator to be able to log into the site and
  allocate
   staff to a project.
  
   Staff will be able to log in and update the status of the project they
 are
   working on and clients will be able to log in and book a member of
staff
   to their own projects.
  
   Administrators will be able to add / edit / delete - staff / clients /
   projects.
  
   Here is my database diagram:
  
   http://www.mania.plus.com
  
   My problem is each different project will need to have different data
   collected for it at each booking. How could I handle this in the
 database
   model? The administrator would like to be able to edit the data
 collected
   for each project via the site...
  
   Any other comments on my database model would be appreciated as this
is
 my
   weakest area of web development by far!
  
  
 
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Database Design Help

2003-03-31 Thread Gustavo Del Castillo Meza
What kind of data do you need to collect at each booking?

Shaun [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi,

 I am creating a database for a web application. The idea for the
application
 is for a company administrator to be able to log into the site and
allocate
 staff to a project.

 Staff will be able to log in and update the status of the project they are
 working on and clients will be able to log in and book a member of staff
 to their own projects.

 Administrators will be able to add / edit / delete - staff / clients /
 projects.

 Here is my database diagram:

 http://www.mania.plus.com

 My problem is each different project will need to have different data
 collected for it at each booking. How could I handle this in the database
 model? The administrator would like to be able to edit the data collected
 for each project via the site...

 Any other comments on my database model would be appreciated as this is my
 weakest area of web development by far!





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php