Jump to content

PC Nerd

Members
  • Posts

    1,122
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    gimli_legs@msn.com

Profile Information

  • Gender
    Male
  • Location
    Australia

PC Nerd's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Solved (myself) Somehow its started working. I looked into how the names were getting passed and I think its to do with this being the second __autorun call, based on another dependency... I had named namespaces without the leading \ and thus I was attempting to access \framework\system\framwork\ui\UI etc.... just like a filysystem only crunchy! Thanks
  2. I'm not sure if the same name will cause the issue, because they are techincally in both forms. that would be like having two forms on a page, one for users to sign in ( name=username) and one to signup (name=username) etc... It might be to do with the fact you're not closing hte <input>'s and thus its thinking that the second form is like a subform to the first, and thus getting rather confused. Indenting code and html can often help with noticing when you've placed something in the wrong spot etc.. Also - it might help to add an onClick event to the buttons so you can alert() out where it's submitting to, that might help also. Good luck.
  3. Hi, You might want to try looking at exploding on the new line, so using "\r\n" or something. i'm not sure if its 100% what you're looking for but it should work. If you're entering smaller amounts of data like that it might make sense to have a "add new field" button and jsut have a table of text fields. if you name them: username[1], username[2] etc, then you will be able to access them in php using an array and thus use the same code as you would resulting from the explode(). Good luck!
  4. Hi, It's hard to say what your rtel.build() function does, but you might want to check that its building the hidden field containing the value you want. The only way to send a javascript variable to php is to have a hidden text field --> <input type="hidden" name="rtel" value="whatever" /> So when you have finished your javascript ( pressumably somewhere around the build(), depending on what it does) you will want to do something like: document.forms[0].rtel.value=retl; this makes a few assumptions that a) you have only one form ( perhaps add a name="myform" attroibute to the form and access it that way), and that you have already created the empty hidden field. When you get to php, you will have the hidden field jsut like any other text field, in $_REQUEST or $_POST etc. Good luck! P.S. - It usually doesnt help to post "urgent" etc. in the thread topic.
  5. Hi, I've written this small __autoload for my page, and it's echoing the correct file out, however I get the "Class blah not defined" in my script. I've root (/) in the filenames is the root of the installation, and htdocs i the only web accessable folder. From the echo below, I get: "../system/classes/UI.class.php", which definately exists. I'm stumped. Thanks for any help. PC_Nerd /htdocs/index.php <?php function __autoload ($className) { $filename =$className.'.class.php'; $filename = str_replace('\\', "/", $filename); if ( preg_match( '/[\w\d\.]+\.php$/', $filename, $matches) ) { $filename=SYSTEM_DIR."classes/".$matches[0]; if(file_exists($filename)) { require_once $filename; return; } else { echo "The file: ".$filename." -> was not found.\n"; } } throw new Exception("Required file was not found: ".$filename." - Class not loaded"); } ?> /system/classes/UI.class.php <?php namespace framework\ui; class UI extends framework\system\Singleton { } ?>
  6. Hi, I like the style of iteration over a MySQLi_Result object such as: while($row=$result->fetch_assoc()) {/* do stuff */} As oposed to something like a for loop with $result->num_rows etc... However how would I code such a function.. I'm not sure what the function ( such as in my case $reportData->fetch_row() ) would need to throw, return or otherwise "do" to quit the while loop and not cause infinite iterations. Thanks, PC_Nerd
  7. I'm not sure what you mean by the "INSERT INTO... SELECT...". (as in I know the SQL.. but not what its talkign about table wise)..... the events table/view/whatever needs to have a static id to each group/sport id combination ( as I showed in the example events table).... thanks
  8. events is the resulting table.. I'm trying to join the groups and sports together, so that the event table contains every sport for every group - with a uid so that I can reference it with point counts etc.... ?
  9. groups -------- group_id int PK group_name varchar upper_limit int lower_limit int sports ------- sport_id int PK name varchar data: groups ------- 1, "Jnr", 12,15 2, "Snr", 16, 19 sports -------- 1,"High Jump" 2, "Long Jump" so that my resulting table would be: events __________ 1, 1( sport_id), 1 (group id) 2, 1, 2 3, 2,1 4,2,2 At the moment I can acheive a similar thing in a view - however the events table cannot have the primary key .... can I get a primary key in there somewhere?
  10. Good point.... two tables, I need to have a third with all of the other two table's worth of data init - linked with a Primary key.... eg: in the new table, for each record in the groups table I would have every record from the sports table... At the moment I can get the data like I want into a view - but those dont allow primary keys ( and understandably)..... At the moment I'm having to "start" the system by using PHP to generate each record into the new table - and then essentially lock access to the other two tables - because changing them could change the new table's data ( which is the "mission critical" thing in the system.... Is there an alternative method to this scripting?
  11. Hi, At the moment I've got two tables: "Sports" and "Groups" - and I've got a PHP script editing another table which is like a "sports by group" (or "events") eg. seperating different groups of competitors (ages, disabilities... whatever the group is)... I need the table to have a static ID for each row/"event" generated.... so I cant use a view because it cant have a primary key. Is there an SQL based alternative, that will allow the same final queryable table/view but that will remove the language side of it (like creating a view with primary keys?) Thanks, PC_Nerd
  12. Hi, I'm thinking or writing a generic plugin based framework to utilise PHP as a pure GUI end of a server application... So not somethign like Joomla but not so "already built" etc. I havent been able to find any good articles/tutorials/references etc on building a plugin based php system and was wondering if anyone here would be able to link me to some tutorials or better still: any open source libraries/projects that I have missed. Thanks, PC_Nerd
  13. alternatively - seeing as you appear to be only starting with php ... it might be easiest to look into setting an array with your field as the date, and the value as a date, and the value as the starsign ( of course you would have to parse the field as you loop through and check) but it'll save you the hastle of files and mysql if you are only just getting started with it. gdlk
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.