Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. First one. However you can use a function if you wish. But first one is fine. Although I'd do this: [code]$new= isset($_GET['new']) ? $_GET['new'] : ''; if ($new == 0){       //Do something }else{       //Do something }[/code]
  2. Remove the @ symbol from infront of mysql_connect to retrieve the PHP error, rather than the MySQL error being returned by mysql_error. Also I have closed your other thread in the PHP SQL forum.
  3. Mod_write will not rewrite the URLs for your links. So you'll have to rewrite the links in your code to the new format manually. mod_rewrite runs when a page request is made to to the server. It then sees if the url matches one of the rewritre rules, if it does it'll process the url in the rewrite rule.
  4. I'd say yes as you could be using that persons network to do illegal things. You are also stealling that persons service and bandwidth.
  5. Dont double post! Use the modify button! I keep telling you that but you never listen.
  6. I guess $result['EMPNO'] holds an array. If it holds an array and you want to know how many items are in that array use count(). mssql_num_rows returns the number of rows returned from the SQL query.
  7. fopen wont display anything. It just opens the file ready for being edited or read by PHP. To read the file you use fread, to edit the file your use fwrite. if you want to display the contents of the file as part of the php gile use include or require.
  8. You can use highlight_string or highlight_file which will colour your PHP code, just the like forum does here: [code=php:0]<?php echo "hello world"; ?>[/code]
  9. If javascript is disabled then the answer is no.
  10. You can only use variables on one page, you cannot use variables one page and then be able to use the same variable on another page. As when php parses the script it stops at the end and clears any variables. However if you want to use a variable on one page and then use it in another you'll have to use a cookie or session.
  11. This has been asked many times before. Please use the forums search facility to search for PHP Editors you'll get plenty of results. For now I'll direct you to two free IDEs I know of PHP Designer 2006 and PHP Eclipse. All with the features your are reusting. Or go for one of the top of range IDEs for PHP and thats ZendStudo which is not free.
  12. You'll want to do this: [code=php:0]eval("echo \"$description\"");[/code] In order for your PHP variables to be parsed
  13. Query looks fine for me, but is your news table actually spelt as newss (note the extra s).
  14. if you have PHP in a database, PHP will treat the PHP as text. It wont parse it. In order to parse it you'll have to use eval
  15. Post the code that is in form2.php here
  16. Sounds good. However I recently found [url=http://www.unwieldy.net/ajaxim/]ajax im[/url] it is very good.
  17. If you are using ENUM you enter this into the textbox exactly '0','1','2','3' You dont enter ('0','1','2','3') Thats what the problem is. Also you still havnt used any compression on your images! When posting images to the web save as gif or a jpeg never a bmp. Thats why I edited your post in the first place. otherwise it takes ages for the page to load for others. I have compresed the images for you now.
  18. My lord! What a reduction! I love dreamweavers clean up html tool!
  19. huh? I'm confused. I mean post the code. Did you post the code from form2.php earlier. Or have I missed something.
  20. I dont thnks he using a text field. As no one will write HTML all in one line! ButI I expect its a textarea, however michaellunsford is about the TEXT data type in MySQL.
  21. AFAIK there is not limit to $_POST It most probably to do with the Text field type, prehaps use MEDIUMTEXT
  22. You'll probably want to use [url=http://php.net/manual/en/function.asort.php]asort()[/url] [code=php:0]<?php $person = array( 'name' => array('Bob', 'Sam', 'Pete'),                 'income' => array('58,523', '23,585', '156,899')                 ); echo 'Before sort:<br /><br /><pre>' . print_r($person, true) . '</pre>'; arsort($person['income'], SORT_NUMERIC); echo 'After sort:<pre>' . print_r($person, true) . '</pre>'; ?>[/code]
  23. You can use PECL print functions if the computer that php is installed on is on Windows. It doesnt matter what OS the user uses when they goto your site it should work. However the printer functions will print to a printer that is connected to the server and not the clients printer. The only way to print a document to the client is with javascript, search for "printing with javascript" in google you should get some tutorials on how to to print with javascript, however I'm not sure whether you can get javascript to print files other than the one being servered to the browser.
  24. header wont fail if you have a file called header.php. It'll only fail if you have some form of out being sent to the browser before the use of the header function. You might want to use ob_start and ob_end_flush to turn on output buffering. Or you can use good old html to redirect. There is not otrher PHP function you can use to redirect the user. header is only option in PHP.
  25. Whats the path that $PRODUCTIMAGES holds? You might want to do this: [code]$photo = (isset($photo) && !empty($photo)) ? $PRODUCTIMAGES.$photo : 'images/No_Photo.gif'; <img name="<? echo $row1['quote']; ?>" src="<? echo $photo; ?>" alt="<? $row1['quote']; ?>" border="0" width="180" height="215" align="absmiddle">[/code]
×
×
  • 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.