Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 01:53
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
| |-+  PHP, Perl, ASP, JSP, CFM (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis, nothingGrinder)
| | |-+  making a working database...problems
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: making a working database...problems  (Read 3391 times)
DR_SEMI_EVIL
Server what's that
*
Posts: 4



View Profile Email
« on: 01/27/02, 14:13 »

http://URL
Hi all...I am trying to make a working database of contact name/phone numbers etc. and also a comments box to keep track of contact made with clients...
So far I can pull the variables from each listing from the txt file (file1.text, file2.txt, etc..now if you click on an "edit button" the client to edit stays there and the flash movie goes to frame 2 which makes all the variables "input boxes" so you can edit that particular one...the problem im having is I cant get the code right to SAVE the changes made to the particular entry to the same txt file it was pulled from (file1.txt for example or it could be file2.txt depending on which entry the user was on initally) and then once it is updated the user actually clicks "save" and the movie goes back to frame 1 reloads the variables
and displays the updated entry also...any help would be very good..I have been learning new things jst by doing this and am making progress but I cannot find what exactly is needed to save to a particular file that was loaded.
Joey
Logged
flashswami
Jr. Programmer
**
Posts: 55


vene vidi vector


View Profile WWW
« Reply #1 on: 01/28/02, 18:13 »

OK, first Hi Dr_Semi_Evil, welcome to Flash-db Smiley,

Second, you're going to have to tell us what middleware you're using i.e. PHP/ASP/whatever. You are going to *have* to use middleware BTW (just in case you think otherwise) as the unsupported fs write to file command is not going to be up to the job in this case.
Logged

Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #2 on: 01/28/02, 19:04 »

Hey DR_SEMI_EVIL,

Yes - the first question that would help is what type of middleware are you using.  Just as Flashswami said - PHP, Perl, asp, etc.  You will need to use one of these.  

(I will assume PHP for ease of explaination)
2nd - In the text file you are writing to you will have to add a File Identifier to the Text file you are loading.  For example if you are loading "File1.txt" - you would want to have something like this

ContactName=ContactNames1&FileNo=1

You'll load that into your Flash movie - But their will also be a variable called FileNo.  If it's loaded from File1.txt it's value would be 1, If it's loaded from File2.txt - it's value would be 2.  etc etc.  

Now that you've got a way to identify your Text file - You can write to that specific one with something like this in the PHP.


      $FileName = "File".$FileNo.".txt";

      $fp = fopen( "$FileName", "w");
      fwrite ($fp, $New, 10000);
      fclose( $fp );

In this case we set the file pointer "$FileName" to File+Whatever Number you are editing.  So only that Text file is written to.  

Hope that makes at least some sense.


Logged

-Jeff.
DR_SEMI_EVIL
Server what's that
*
Posts: 4



View Profile Email
« Reply #3 on: 01/31/02, 01:31 »

Okay I have pretty much got everything, to the point where I know it almost works....All my paths to perl are correct and Ive set all the permissions but theres something thats not communicating correctly,
1. can I have more than one list file?...I'm assuming yes in this case right?...
$listfile="file1.txt";  what would be the syntax to add more? , &?
2.the way i have it now i have a scroll menu listing the names ( done in flash manually)....and multipe text files....would it be better to somehow have ONE text file and have the scroll list update dynamically by pulling in one of the variables?..in this case &company=company name.
I really appreciate your help..I just started a new job (selling for a computer distributor), BUT I wanted to pursue New Media anyway to impress my boss AND to help me manage my client list I wanted to create this program to run on our server. Now they are really taken by the idea of using this and they hope (translated "youre gonna look bad if you cant do it") to see a functional demo by tuesday coming.
Anyway if I really could get help to finish this I could pass on very good deals on anything computer related.
Once again thanks for helping me so far ( I love learning all these new things)
Joey
Logged
DR_SEMI_EVIL
Server what's that
*
Posts: 4



View Profile Email
« Reply #4 on: 01/31/02, 01:33 »

BTW I was using CGI (going by a tutorial for the flash guestbook same concept kind've).
To get some concept of it I have it here for now
http://mindset.microsearch.cc
use joey for the username and 123456 for the password.
« Last Edit: 01/31/02, 01:35 by DR_SEMI_EVIL » Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #5 on: 01/31/02, 11:55 »

Hey Joey,

I understand what your trying to do.  Honestly this would be much easier if you where using php and mySQL.  Perl is the hardest langauge of all the server side scripting langauges to work with and the most difficult to set up and get running right away.   If/when you do get this to work with Perl and Text files - then when you start using a real dbms (data base management system) Like mySQL you'll probably ask yourself why you ever even bothered with Perl and Text files.

What you have so far does look good though.  One thing you could do - Is have an index Text file - this file would contain a list of the contacts that you currently have in the database along with the Text file name associated with each contact.  In this way you can dynamically load the menu, and add to the list when a new contact is entered.  You would have to append new text listing describing a new contact listing each time a new one was added.  In this way the menu can be dynamic as well - and you won't have to edit it ever.

Each listing would have a variable associated with it that would act as a Pointer (File Pointer) to a Text file for a specific contact.  In this way you know which text file you want to edit for each specific contact.  

This system will get a little bit complicated, and I'm not sure how much that helped - but anyways try some of those things, and i'll try to answer any other questions you have when they appear.
Logged

-Jeff.
DR_SEMI_EVIL
Server what's that
*
Posts: 4



View Profile Email
« Reply #6 on: 02/06/02, 23:06 »

okay this is what I have....as of now I am using this at work but editing each txt file manually then the flash updates the info....all we have on our server at work is .asp...and i just gave up on perl for now......my other sales guys dont use it yet because of the editing feature (its non existent from the GUI....)   I just wish it was as easy to edit txt from flash as it is to loadvariable from txt into flash(sheesh) security issues I know (funny how flash is more secure than the OS running it....lol...oh well.......

http://mindset.microsearch.cc

adding the source file variable helps me locate the right text file to use but still cumbersome....If it helps any im running this as a local db for each user in their own file...its on one of our server but not as a webpage more of an application...
thanks all....Joey
« Last Edit: 02/06/02, 23:12 by DR_SEMI_EVIL » Logged
Pages: [1] 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!