Jump to content

zero118

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zero118's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I apologize, the error was elsewhere. Sometimes all you need is someone to make you look at the code a little harder =-) The array was fine, it was a query that was causing the issue.
  2. Yes, I can see the array just fine. But it is still telling me the argument is invalid. Could it have anything to do with the format of the contents? A sample would be FVRB-8239
  3. I keep getting an invalid foreach argument here... case 'move_loc': foreach ($_POST[ 'move' ] as $key ) { $update ("UPDATE recert SET location =" . $_POST[ 'location' ] . " WHERE serial = '$key'"); } break; My form uses 'move' as the checkbox names and I am attempting to update multiple rows at one time. I do not have much experience with foreach so any help is appreciated.
  4. I also cannot get into the command line because it will not accept the password so I don't think it's a phpmyadmin problem
  5. Hey guys. I am a linux novice but I am fairly good with the commands. I have installed Ubuntu server and GNOME... I also tried to install phpmyadmin but it refuses to accept any password to let me into mysql. If there a way that I can reset permissions, reinstall the software, etc?
  6. The biggy is that they're not always in range of the internet. I was thinking that maybe I can duplicate the server onboard the truck and just sync the info with a script when they get back. But this would be difficult since numbers are automatic (not just `id`s but the numbers of the parts they are testing). Another thing I was thinking would be to just save the money in computer equipment and have them fill out forms and enter them when hey return. But this lacks the benefit of searching past records when they are out. Maybe a touchscreen laptop that lets them fill out digital forms? I could copy the database to the laptop before they go this would still let them search but not enter directly into the system.... Make sense?
  7. Personally, I wouldn't store them at all. But if you decide that you need to, at the very least you should md5 hash them.
  8. Greetings. So, I'm building this application in PHP on a dedicated system here. It will not be accessable outside the building for security reasons. My question is: What would be the best way for our employees in the field (on a mobile truck) to get the information from this system and to send results back? I've thought about setting up a VPN but that would only work if the truck were in cell range for internet access and that doesn't always work. I've also considered basically duplicating the system onto another computer that could stay with the truck and simply be synced when they returned... But this obviously is not ideal. Any suggestions? (I hope I'm in the right thread.)
  9. Excellent! Thanks! Works like a charm. I was never good at using JOIN but this will help a lot.
  10. Greetings. I am attempting to get familiar with Object Oriented Code but I cannot seem to grasp how to merge two tables with it. Here is my code (ask if you need to see the functions but I think you can gather how they work). Basically, I want the 'cstmr' field of the `serial` database table to find the Company Name in the `customer` database table for the corresponding ID. So instead of showing "128" it shows "General Motors" (just an example, we don't have the money to bailout GM). Thanks! <?php require_once ( '../settings.php' ); $login->checkLogin ( 1 ); include ( '../lib/Pagination.php' ); $login->add_user_groups (); $pagination = new Pagination(); $pagination->start = ( @$_GET['start'] ) ? $_GET['start'] : '0'; $pagination->filePath = APPLICATION_URL . 'admin/admin_serials.php'; $pagination->select_what = '*'; $pagination->the_table = '`' . DBPREFIX . 'serial`'; $pagination->add_query = ' ORDER BY `ID` ASC'; $query = $pagination->getQuery ( TRUE ); $paginate = $pagination->paginate(); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?= $login->design->get_page_title ( 'admin' ) ?></title> <?= $login->design->get_page_css () ?> <?= $login->design->get_page_js ( 'admin' ) ?> <script type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </head> <body> <div id="top"> <?= $login->design->setMenu () ?> <div class="content"> <h1><?= $login->functions->Lang ( 'manage_serials' ) ?></h1> <?= $login->design->get_admin_menu () ?> <?= $login->message ?> <TABLE border="0" cellpadding="4" cellspacing="3" width="98%"> <caption><?= $login->functions->Lang ( 'manage_serials' ) ?></caption> <thead> <tr> <th width="20"> </th> <th><?= $login->functions->Lang ( 'hserial_num' ) ?></th> <th><?= $login->functions->Lang ( 'hcust' ) ?></th> <th><?= $login->functions->Lang ( 'hpart_num' ) ?></th> <th><?= $login->functions->Lang ( 'hstatus' ) ?></th> </tr> </thead> <?php $nr = 1; if ( $login->db->RecordCount ( $query ) > 0 ) { $groups = $login->db->get_results ( $query ); foreach ( $groups as $row ): $row_class = ( $nr % 2 ) ? '' : ' class="alt"'; ?> <tr<?= $row_class ?>> <td><?= $nr ?></td> <td class="lft"><?= $row->serial ?></td> <td class="lft"><?= $row->cstmr ?></td> <td class="lft"><?= $row->fvprt ?></td> <td class="lft"><?php if ( $row->status == '1' ) { echo "<img src='" . APPLICATION_URL . "images/icons/tick.gif'"; } else { echo "<img src='" . APPLICATION_URL . "images/icons/tickfail.gif'"; } ?></td> </tr> <?php $nr++; endforeach; } else { ?> <tr> <td colspan="4"><?= $login->functions->Lang ( 'no_groups' ) ?></td> </tr> <? } ?> </table> <?= $paginate ?> <div class="clear"></div> </div> <!-- FOOTER --> <?= $login->design->setFooter( ) ?>
  11. I really wanted this to work on IIS 7with 2008 Server but it's just too much of a headache. I'm going to just install Apache
  12. if I open this (inc_usercheckall.php) by itself I see that it connects and tells me wrong password. If I try to load this from my login for I get the 500 error again.
  13. I meant to add the = in there... I don't get any new error with the added tags. IIS is still just saying 500, There is a problem with the resource...
  14. Actually, yes. PHP is running, just some odd things that make me think this is the php.ini causing it... For instance I cannot use <?$variable?> to display but I can use <? echo $variable ?> I will add the tags when I get to the office and let you know what I get.
  15. This is just a simple, NON-object oriented system that I was playing with and I just want to make sure I get things right on the 2008 server. So please don't laugh =-) <?php $dbhost = 'localhost'; $dbusername = '*****'; $dbpasswd = '*****'; $database_name = 'nimbus'; $length = '5'; // Site information $siteadd = '10.0.1.197'; $formsOnOff = '1'; // 0=off 1=on $level = $_SESSION['s_userlevel']; $username = $_SESSION['s_username']; $disname = $_SESSION['s_disname']; //db tables $user_database_table = 'users'; $serials_database_table = 'serials'; /* Database Stuff, do not modify below this line */ $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to server."); $db = mysql_select_db("$database_name", $connection) or die("Couldn't select database."); if ($db) {echo "Connected!";} ?>
×
×
  • 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.