Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 00:56
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  MySQL, PostgreSQL, MS SQL, Access (Moderators: Flash-db, Musicman, Ronald Wernecke, Jorge Solis, Andries Seutens)
| | |-+  inserting data to SQL through PHP
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: 1 [2] Print
Author Topic: inserting data to SQL through PHP  (Read 6550 times)
BurtonRider1983
Global Moderator
Systems Administrator
*****
Posts: 864

Rider-4-Life

BurtonRider1983
View Profile WWW
« Reply #15 on: 04/26/02, 16:36 »

oh and by the way....I really appreciate the help...this is the only thing holding up 2 websites I am making. Lates.
Logged
BurtonRider1983
Global Moderator
Systems Administrator
*****
Posts: 864

Rider-4-Life

BurtonRider1983
View Profile WWW
« Reply #16 on: 04/29/02, 17:04 »

I am still having trouble....can you give me any code that would help me to query the database and compare the values???
Logged
BurtonRider1983
Global Moderator
Systems Administrator
*****
Posts: 864

Rider-4-Life

BurtonRider1983
View Profile WWW
« Reply #17 on: 04/30/02, 20:59 »

I am getting really frusterated with this one. I am trying to search the database to see if a username is in it under the obvious field "username." The variable for the username that Flash is sending to the php is "memberid." This is the first thing.  After that I want to send the row number that the username is in if it is actually found and use that to pull the password.  then I want to compare the memberpass from Flash with the "password" from the database. I just wrote this code and am getting a parse error on line 18  that I cannot locate, but that is not the big problem.  The problem is getting the code to do what I want.  I had it written out to pull and compare the password too, but I got rid of that to simplify and try to get the code to work.  

<?php
$server="localhost";            
$DBuser="mw9net";              
$DBpass="******";
$database ="mw9net_Login";
$table="profiles";

$DBconnect = mysql_connect($server, $DBuser, $DBpass);

mysql_select_db($database,$DBconnect);

$result = mysql_query("SELECT * FROM $table, $DBconnect);
$numrows = mysql_num_rows($result);
$numrows = $numrows-1;

$counter=0;
do{
$memberid = (mysql_result($result, $counter, "username"));
++$counter;
}
while($search != $memberid && $counter <= $numrows);

$match = $counter-1;

if ($search !=$memberid){
$status="status=Invalid Username";
echo ("$status");
mysql_close($DBconnect);
}]

mysql_close($DBconnect);
?>

Any help would be appreciated.....I have been stuck for over a week. Thanks Jeff....or Musicman.....whichever can help first. Lates.
                                                                                 -Ian
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #18 on: 05/01/02, 18:07 »

Hi,

I think I can help you best if you mail me
a mysqldump of your database
the php script (I dont like copy-pasting from the browser)
and a F5 movie that expects the php script in the same directory

Musicman
Logged
BurtonRider1983
Global Moderator
Systems Administrator
*****
Posts: 864

Rider-4-Life

BurtonRider1983
View Profile WWW
« Reply #19 on: 05/01/02, 19:18 »

I tried to email you and I got an error return mail, saying that your address didn't exists.

I do not know what a mysqldump is....I am running everything off of my web host...I do not have my own personel server to work with at home.
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #20 on: 05/02/02, 18:05 »

Hi,

I never noticed I still had an old email there...
If you are using phpmyadmin at the website, there should be some function to download an entire database.
BTW: there is a field where you can insert sql statements or upload a file; this dump file is written such that you could restore a database by uploading the dump file

Musicman
Logged
BurtonRider1983
Global Moderator
Systems Administrator
*****
Posts: 864

Rider-4-Life

BurtonRider1983
View Profile WWW
« Reply #21 on: 05/07/02, 10:59 »

Well thanks to some help and code from musicman I have the php successfully querying the database and testing the data.  The next problem that I am having is with testing for the load of the data back into flash.  I use the onClipEvent(data)  with no luck.  My post for this is here....
http://www.flash-db.com/Board/index.php?board=2;action=display;threadid=580
Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!