Jump to content

thepip3r

Members
  • Posts

    289
  • Joined

  • Last visited

    Never

Everything posted by thepip3r

  1. u need to paste your code.  this doesn't sound right so we need to see where your code is messed up.
  2. [quote]But all the databases have been deleted, because when nothing else worked I tried to reinstall MySQL. So when I run the very simple script: Unknown database 'forum'[/quote] um... forum no longer exists according to the mysql error.  did you recreate your database and tables after you reinstalled mysql?
  3. yes but do you have some back-end function that's pulling this information from the hardware of the connected device?  I don't know but I'm pretty sure PHP can't do this natively.
  4. $sql = "SELECT * FROM DB WHERE firstname LIKE '%Da%' DESC"; Change DA in the code to whatever variable you have that holds the first two letters of each queried name.
  5. um... wtf is a "nasid" and where is this mysterious code you speak of that's not working?
  6. when you use print_r, u should use HTML <pre> tags encapsulating it so the output is formatted nicely.  regardless, your question is incredibly vague but anyways, $subscription is an array of returned results for whatever mysql query you're running and all of the MarketIDs are what's being returned as an answer to your query.
  7. The "Hello" message is an easy PHP echo of the logged in person's username.  The date generated is more than likely javascript.  The hello message would require a registration/user management system of sorts and a date javascript function is as easy as typing it into google and using the one you like that comes up.
  8. if you're using an ordered list, you can't control the numbering sequence; the number just increments from 1 every time an <ol> tag is called.  if you want to create your own numbering system, you're off to a quasi-OK start.  Remove your while statement altogether.  You will definately need a loop but the loop you need is to read each line of the file you've opened.  Look at the fopen() function on how to loop through each line in a file.  Once you start doing that, just echo $nameid in your loop and increment the number using $nameid++; That will increment the number for each iteration of your loop...
  9. add-on - if my dictionary file is corrupt, why would a command-line operation for aspell work and not one through PHP?
  10. I don't mean to sound like a noob printf because I DO appreciate all you've helped so far but I'm not seeing where you're getting that from the mailing list.  I went to the ASpell website, clicked on the Mailling List link and it sent me to http://savannah.gnu.org/mail/?group=aspell.  From there, I clicked on each link and also ran searches for a myriad of variations of my error in a number of different categories (bugs, support, etc) and didn't get one entry returned. The files were automagically loaded on my 2K3 server when I ran the install files for either ASpell itself or the ASPell english dictionary.  It was an HTTP download so I'm not sure how the format could've gotten messed up.  Regardless, I downloaded, overwrote, and retried your function to no avail.  same set of errors.  if you could direct me to the location where you were getting that mailing list info, i'd be more than happy to peruse for a fix, i'm just not sure exactly how to get to them. thanx again for all of the help printf, i sincerely appreciate your continued effort.  =D
  11. ah yes... your problem lies with scope... variable scope to be more specific.  after you run your vars through the functions you've listed (fixvar(), inbusiness()) try to echo some of them out to see what you get.  more than likely, nothing at all.  The reason for this is that you need to either take the actions in fixvar() out of a function or you need to [url=http://www.php3.de/return] return[/url] your variables so that the rest of your code outside of that function can see the variables after you've manipulated them.  also, when in your code are you calling submituser()???  I see you instantiate the function but you don't ever call it?  is this just because you haven't gotten to that point yet? Edit:  Your welcome on the code snippet.  I use it regularly to verify my data is coming through for multiple arrays, I've actually turned it into a simple function: [code]function iterateArray($array) { echo "<pre>"; print_r($array); echo "</pre>"; return $array; }[/code] and then to use: [code]iterateArray($_POST); iterateArray($_SESSION); etc...[/code] this is a bad example of return as it's not needed but is used in case my array passed is NOT a global one...
  12. In this error:  "Unhandled Error: C:\Program Files\Aspell\dict/en-only.rws: The file "C:\Program Files\Aspell\data/iso8859-1.dat" is not in the proper format." is it supposed to be reading the file in the last directory with a forward slash instead of a backslash?
  13. change $msg = $_GET[myValue] to $msg = $_GET['myValue'].  it should work this way.  also, verify that the $_GET array is even seeing the variable passed.  use this function on the nextpage.php to see what's in the $_GET array: [code]echo "<pre>"; print_r($_GET); echo "</pre>";[/code]
  14. I copied and pasted your code and get the EXACT same two errors as listed before. [quote]This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. X-Powered-By: PHP/5.1.4 Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Cache-control: private Content-type: text/html [/quote] and [quote]Unhandled Error: C:\Program Files\Aspell\dict/en-only.rws: The file "C:\Program Files\Aspell\data/iso8859-1.dat" is not in the proper format. [/quote] oh and one more step to add to my troubleshooting, I tried simply uninstalling ASpell and the dictionary files and reinstalled them to no avail; caveat - this shouldn't have worked since the command-line portion is working fine BUT i figured i'd give it a shot anyways...
  15. just change your error checking to [code]if (!$_POST['email']) {   echo "error, no email addy";   exit; }[/code] u need to also do a much more thorough check on an email address using preg_match() or something like that.
  16. Here are the other errors I get... [code]This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. X-Powered-By: PHP/5.1.4 Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Cache-control: private Content-type: text/html [/code] and [code]Unhandled Error: C:\Program Files\Aspell\dict/en-only.rws: The file "C:\Program Files\Aspell\data/iso8859-1.dat" is not in the proper format. [/code] I tried both "en_US" and "en_US.multi" and that's when I get the above two errors.  I've also tried psell_new('en','american','','',PSPELL_FAST) and I get the last error most recently listed above.
  17. Ok, Windows Server 2003, IIS 6, PHP 5.  I enabled the extension in my PHP.ini, I installed the Aspell program.  I installed the Aspell EN dictionary.  I copied the appropriate Aspell .dll to my PHP, and System32 folders.  I've run a successful Aspell operation from my servers command line in troubleshooting.  I've checked phpinfo() to verify that pspell support is showing "enabled".  Yet, after all of this, whenever I call pspell_new('en'), I get the following error: [quote]Warning: pspell_new() [function.pspell-new]: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in E:\war\addBullets.php on line 8[/quote] When I try to use a sourceforge project for spell checking HTML forms, it throws another error but I can't seem to reproduce it at this time and the above problem might fix the other so if anyone knows what I'm doing wrong, please help.  Here's my code that I got off of the php.net site in trying a spell check function: [code]function spellcheck ( $string ) {   $words = preg_split('/[\W]+?/',$string);   $misspelled = $return = array();   $int = pspell_new('en');   foreach ($words as $value) {       if (!pspell_check($int, $value)) {           $misspelled[] = $value;       }   }   foreach ($misspelled as $value) {       $return[$value] = pspell_suggest($int, $value);   }   return $return; }[/code]
  18. oh... and change if (isset($$_POST['submit'])) { to if (isset($_POST['submit'])) { and what PHP editor are you using??? a good PHP editor will help you see a lot of coding errors like an unclosed bracket, extra quotations, unescaped quotes, etc...  one i use and swear by is totally free and a sourceforge project.  notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm)
  19. *sigh.... you are missing the point and this MUST be just a fragment of your registration page??? post the code for the whole page so we can see if your problem lies somewhere outside of where YOU think it does.  Do you even know if your registration form is posting variables the way it should be?  use the following code to look at the $_POST array once your data has been submitted so you can see even if the submitted data is getting transferred after the button's been clicked: [code]echo "<pre>"; print_r($_POST); echo "</pre>";[/code]
  20. is this supposed to be the registration and the login page?  Regardless, you have no breakout to perform your PHP functions when your form is submitted all of that information is just processed every time the page is loaded.  All of your error checking code for the $_POST superglobal should ONLY happen if your form has been submitted (ie: [code]if ($_POST['submit']) { // start checking submitted values } [/code] aside from the includes, the only code your PHP interpreter should be parsing prior to the user submitting information is the HTML code for the form... all of the other PHP error trapping needs to occur on a condition like described in the above code.
  21. Don't understand youre question... REMOTE_ADDR shows the IP address of the visiting surfer in the $_SERVER array.  what are you looking for more specifically?
  22. change: $_[ $line['title'] ] = $line['value']; to $_[ $line ]['title'] = $line['value']; ...if you're trying to make "title" in the 1st dimension of the $_[$line] array.
  23. If this is the script you tried to implement, http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm then I wouldnt' use it altogether.  Not only could I not get it to work on my PHP site but when I went to the aforementioned dynamicdrive site, the menu disappeared and wouldn't come back after scrolling up and down a few times.
×
×
  • 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.