Jump to content

tom100

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tom100's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's a problem, but the notice you are getting is because you are referencing "id" without any single quotes. Normally that would mean it is a predefined constant, but since PHP is smart, it just throws a notice and converts it to 'id'. Change $_SESSION[id] to $_SESSION['id'] and put session_start at the very top of the code and you should be ok.
  2. page has to be initialized if your sending the variable through the url such as: if ((isset($_GET['page']))&&(ctype_digit($_GET['page']))) { $page=$_GET['page']; }
  3. You could change the query to say SELECT * FROM instead of SELECT count(*) to return 3 rows, or look at the value of count.
  4. Your query select count(*) is merging all your results into 1 row. So if you output the total number of outputted rows, it will only say one. I bet if you output the actual result of the query, you'll get 3.
  5. I still use the big "no no" - notepad. I code faster in notepad than I do with any IDE. Speed is based on reusing code, well structured code, and good programming logic. Notepad + Local Apache Test Server Many companies will not hire someone who says they use notepad. In fact, a lot of self acclaimed "expert programmers" give the advice that if they use notepad, don't hire them; and yes people do believe them. It doesn't really matter to me though because I know I am much faster, efficient, and secure using notepad and have enough ambitions to make it on my own anyway.
  6. A lot of corporations prefer ASP for one major reason. Microsoft. ASP has the backing of Microsoft and technical support. I have been turned down for jobs because I actually rather hate ASP, for reasons of coding structure and other various things. The company's response to my question "Why ASP?" was that "ASP has technical support." Which really doesn't mean anything because their not going to program it for you. Then again, this question is going to most likely get biased results, as it was posted on a PHP board. For non-biased results, try posting on a general computer programming board.
  7. Not sure if I fully understand what you want, but: You could explode the string based on spaces: $string="GSM Phone C330"; $words=explode(" ", $string); // $words = array("GSM", "Phone", "C330") From there you could loop through each word and run it to the database. That would give you results for one word. For two words, you could have it run through a loop and combine the various combinations of words: for ($x=0; $x<=count($words); $x++) { $myWord1=$words[$x]; for ($y=$x; $y<=count($words); $y++) { $myWord2=$words[$y]; } $sql="SELECT * FROM `table_name` WHERE `FIELD` LIKE %{$myWord1}% AND `FIELD` LIKE %{$myWord2}%"; }
  8. explode the string using \n. Strings, when used like an array return the character at that position. So $content=file_get_contents($url); $lines=explode("\n", $content); $lines[0] //Line 1 etc
  9. I have to get back to work cause i keep spending to much time on these boards... So I am going to post my session variables. This is working on my system, you can try to mix and match and see what might be causing it. session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\php\upload session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid 0 0
  10. Ok, here's some things I see: PHP is saving your temp sessions to the directory below, not where you previously posted: C:/php/tmp Make sure that folder exists. Also, you can try setting use_cookies to 1 in your PHP.ini
  11. I'm going to reuse a post I posted before ----- Create a page with this code: Code: <?php session_start(); if (isset($_SESSION['count'])) { $_SESSION['count']++; } else { $_SESSION['count']=0; } echo $_SESSION['count']; ?> Then, go to that page. Refresh it a few times. See if the number it outputs increases. If it does increase, there is a problem with your script, if it doesn't, there is most likely a problem with your PHP session temp dir or a setting in php.ini
  12. Did you add the semicolon? Also, whats the error.
  13. Your mail settings are setup wrong, or you don't have anything setup. Your script is fine, but your server can't send mail. http://www.php.net/manual/en/ref.mail.php
  14. By the way, the windows servers often have a default setting in PHP that needs to be changed: Try commenting this out in the php.ini session.use_only_cookies = 1 So that line should be: ; session.use_only_cookies = 1 Restart your server then try it.
  15. 1.) Frames are evil and they will break your site . 2.) You have to target the frame. In order to target the frame, you must give it a name in the framespage. You will have 3 pages to display 2 pages. page 1: Main frame page telling the browser to show the left and right page. page 2: Left page page 3: Right page You will need to specify the name in page 1. P.S. this is an html question. However, you could use includes if you are willing to format your pages and remove html headings, etc from your files.
×
×
  • 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.