Jump to content

garry27

Members
  • Posts

    161
  • Joined

  • Last visited

    Never

Everything posted by garry27

  1. Oh, right. Silly of me. I thought the second argument was for the record you would want the LIMIT to stop at. Many thanks
  2. I've go this sql I'm using to extract records for a page recordset and it works fine for the first 1-5 records. For the next 6-10 records however, it shows 7 records, and the page after that shows only 2. The total num of records in the database is 13 and running a query without LIMIT confirms this. SELECT * FROM GA_Gig, GA_Town, GA_Venue, GA_User WHERE GA_Gig.townID = GA_Town.townID AND GA_Gig.venueID = GA_Venue.venueID AND GA_Gig.username = GA_User.username AND GA_Town.region = 'North East' ORDER BY GA_Gig.date LIMIT 6,10 Please someone advice me on how I can fix this.
  3. Hi Nightslyr Yes, the outputted code stops right after the container div's openning tag is rendered There's a fair bit of code between the container div and the opening form tag, such as the header with a login box (it only just occured to me that this almost certainly is what is interfering with it but no- I've removed it and still the same problem. lol), menu nav bars, a page heading. Yes everything works except userEmail and userPassword. Here is how the display method for class PAGE starts off: function display() { echo "<!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> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>"; echo $this->getTitle(); echo $this->getKeywords(); echo $this->getCss() . $this->getJavascript() . $this->getAjax(); echo "</head> <body $this->bodyAttr >\n" ."<div id='container'>\n"; echo $this->getHeader(); echo $this->mainMenu; echo "<div id='mainContent'>" .$this->subMenu
  4. I've also commented out the attributes which are called inside the input elements- like I said, it's really stripped down.
  5. Here's the class I use to build the form: function getForm() { $action = $_SERVER['PHP_SELF']; $textBoxClass = 'w200'; $form = "<form action='$action' method='post'> <input name='memberType_2536' type='hidden' value='musicians'/> <div class='inputElem'> <input name='username' class='$textBoxClass' value='".$this->postValues['username']."' type='text' maxlength='".$this->FD->maxLens['username']."' /> </div> <div class='inputElem'> <input name='userEmail' class='$textBoxClass' value='".$this->postValues['userEmail']."' type='text' maxlength='".$this->FD->maxLens['userEmail']."' /> </div> <div class='inputElem'> <input name='stageName' class='$textBoxClass' value='".$this->postValues['stageName']."' type='text' maxlength='".$this->FD->maxLens['stageName']."' /> </div> <div class='inputElem'> <input name='forename'/ class='$textBoxClass' value='".$this->postValues['forename']."' type='text' maxlength='".$this->FD->maxLens['forename']."' > </div> <div class='inputElem'> <input name='surname' class='$textBoxClass' value='".$this->postValues['surname']."' type='text' maxlength='".$this->FD->maxLens['surname']."' /> </div> <div class='inputElem'> <input name='userPassword' value='' type='text' /> </div> <div class='inputElem'> <input name='userPassword2' class='$textBoxClass' value='".$this->postValues['userPassword2']."' type='text' maxlength='".$this->FD->maxLens['userPassword2']."' /> </div> <div class='inputElem'> <input name='asa' value='Sign-up' type='submit'/> </div> </form>"; return $form; } Everything else, I've disabled such as the validation class I have- all it does is return so the form details never gets to the register stage. <?php // error_reporting(0); session_start(); require ('classes/classes.php'); $FORM = new REGISTRATION_FORM; $PAGE = new PAGE(); $PAGE->css = array('style_sheet.css','navigation.css', 'date_picker.css'); $PAGE->javascript = array('common.js'); //$PAGE->ajax = array('jquery-1.2.1.pack.js','intellisense_ini.js'); $PAGE->bodyAttr = "class='body' onload='disableAutoComplete()'"; ##attempt add listing if($_POST['memberType_2536']) { //validate $failed = $FORM->validatForm(); if($failed > 99) { while($msg = current($failed)) { $errorMessages .= "<br/>$msg"; next($failed); } } } $PAGE->title = 'blah'; #main content $content = "<h1>blahblahblah</h1> <div id='statusBox'> <!-- needs a space to keep the the div width!!! --> \n $errorMessages \n </div> <!--col 1 start--> <div class='w200Col'> </div> <!--col 2 start--> <div class='w200Col'>" .$FORM->getfieldTexts() ."</div> <!--col 3 start --> <div class='w400Col'>" .$FORM->getForm() ."</div>"; $PAGE->content = $content; $PAGE->display(); ?>
  6. I have a very basic form that I have completely stripped out any functionality once the form is submitted, in order to identify the error. The problem I have is If I try to send an input with the input name 'userEmail' or 'userPassword' with a non zero value the page outputs up until the containing div is called and then stops. Like this: ...doctype...head..stylesheets etc. <body class='body' onload='disableAutoComplete()' > <div id='container'> ..then nothing I have no idea why this is happenning and why it is singling out these two name values. When I edit the name of the values in the input elements, the page re-executes as normal. I'm using post but when I try get the page re-executes as usual. I don't know if it could be the file that is corrupt? A couple of days ago I had to reinstall zend studio eclipse as it failed irreversably while I was using it. When I var_dumped the post global vaiables before I commented out all the serverside functionality, it showed that the values passed ok but still the page displayed incorrectly. Any ideas, please? ???
  7. Basically, what I want to do is have a ajax-based autocomplete functionality show only records that I specify using my own code. I have a drop down list which accomplishes this but the browser default menu hovers over this menu which is exactly what I don't want. There must be some way around this. If you look at http://www.nationalexpress.com/, which is the "defacto" train/coach booking website for the UK, you will find that it uses a drop down list which utilizes Ajax and is not based on the history settings in the browser.
  8. That doesn't seem to be the case on the uk ebay site. In fact there's actually an option that allows you to turn off their pop up. Theres got to be be a workaround somewhere?!?
  9. I don't know if this is possible but can I disable the autocomplete drop down box that appear below text boxes by default in web browsers?
  10. Is it possible to pass a parameter into a Javascript file in the header when you call it in HTML like this: <script type='text/javascript' src='javascriptfilename.js?paramname=paramvalue'></script> If it is- how do I collect it in the javascript file? Thanks.
  11. I've been trying to create a loop for the following array but I keep getting errors. $formOutputData[] = array(array('name'=>'username', 'longName'=>'Username', 'maxLen'=>20, 'isRequired'=>true ), array('name'=>'forename', 'longName'=>'Forename', 'maxLen'=>15, 'isRequired'=>true ), array('name'=>'surname', 'longName'=>'Surname', 'maxLen'=>20, 'isRequired'=>true ), array('name'=>'town', 'longName'=>'Town', 'maxLen'=>20, 'isRequired'=>false ), array('name'=>'userEmail', 'longName'=>'Email Address', 'maxLen'=>40, 'isRequired'=>true ), array('name'=>'userPassword', 'longName'=>'Password', 'maxLen'=>20, 'isRequired'=>true ), array('name'=>'userPassword2', 'longName'=>'Password', 'maxLen'=>10000, 'isRequired'=>false ) ); here is the loop I'm using (pretty much out of the book i'm using) but I get: Warning: Variable passed to each() is not an array or object in /home/gigaddic/public_html/classes/user_input.php on line 96 function getNameValues($formOutputData) //get expected key and value params { $expected = array(); $num = count($formOutputData); for ( $row=0; $row < 6; $row++ ) { while (list($key,$value) = each($formOutputData[$row])) { if($value == 'name' && $_POST[$value] ) { $expected[$key] = $value ; } } } return $expected; } Please advise me
  12. I'm confused now. I've moved the call to my login function from inside the html to above the html so that there's nothing getting outputted to the screen before the header function is called and I'm still getting the header error. line 102 is the last line in that script (i.e. the php closing tag). login() is contained in that script witht he redirect code. My index page looks like this: <?php session_start(); require_once('all_php_fns.php'); error_reporting(E_ALL); login(); do_html_header('HomePage','','','',''); show_top_navbar(); show_main_div(); show_left_coln_inx(); show_right_coln_inx(); //contains login form do_html_footer(); ?>
  13. I've set errorreporting on and I hget the header already used error now. I guess I'm goint to have to rework it the way akitchen suggests in the sticky. Many thanks!
  14. This is how I'm using it now. The echo out is just to confirm that the header line is being skipped out. if ($row['accType'] == 'P') { $_SESSION['valid_pa_mbr'] = $email; header ("Location: pa_mbr.php"); echo("pa member logged in.."); }
  15. I've recently migrated a site to a new server and the header function I use for login authentication has stopped working. I've tried using relative and absolute urls but in both cases the php appears to ignore the header function completeley. Any ideas please?
  16. I've contacted web hosting uk again and it turned out ito be a problem with them as it's working now using the syntax I decsribed- so thanks for your help guys.
  17. i've set a new user with all new permssions and put the extended name as the password (and tried it for db as well) i.e. cpanelUsername_DBuserName and I get this new error message:
  18. nopes. i get the same thing when i try with a different user. i've tried a false password and username and i get the same error message with this as well :-\
  19. That's the way I have it in my code- I got it mixed up when I posted it here.
×
×
  • 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.