Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Rather than send a numerical id to gallery.php you'll want to send a string instead. So you might want to do something like this, if you want to use outside, hobbies rather than site1, site2 or sitex (x being a number): [code]RewriteRule ^([A-Za-z]+)$ gallery.php?page=$1[/code] This time when you do something like this: mysite.com/outside it'll call gallery.php with the url parameter id=outside Also with that you dont have to keep editing the htaccess file. However you may need to chnage the code in gallery.php though now that you are sending a string rather than a number in the id variable.
  2. Like this: [code]<!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=iso-8859-1" /> <title>example.html</title> </head> <body> Hees my code:<br /> <textarea cols="50" rows="15"> &lt;!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'&gt; &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; &lt;head&gt; &lt;title&gt;example.html&lt;/title&gt; &lt;/head&gt; &lt;body&gt; Hees my code: &lt;textarea name=&quot;html&quot;&gt; &lt;/textarea&gt; &lt;/body&gt; &lt;/html&gt; </textarea> </body> </html>[/code]
  3. Not sure what you mean by why i code css so fast. Never thought I was fast. Sometimes I do get stuck with CSS, my mind just goes blank over CSS at times. Well the standard currently set by w3c is CSS2.1, most browsers should be following that standard by now. And this is the standard all web developers follow.
  4. You cant. There is just 1 version of CSS which is embeded into the web browser you use. Most have versions 1 and 2 More uptodate browsers have some CSS 3 features.
  5. Are you typing plain html inot the textarea? If you are then this why. You should chnage the html characters into there html equivalents. EG: < converts to & lt; > converts to & gt; & converts $ amp; Note the examples above should not have a space before the & character. I had do this due to the forum pasing the html. if you are adding the html in with php then use the htmlspecialchars function: [code=php:0]$myhtmlvar = htmlspecialchars($myhtml); echo '<textarea ..your html attributes here ...>' . $myhtmlvar . '</textarea>';[/code] This will then prevent the validator from flagging errors.
  6. You havnt setup the my_database database for the root user to use. You'll need to change this via the mysql command line or use a third party database management software to change the permissions, such as phpmyadmin, or use MySQL Adminstrator. If you use phpmyadmin. Login to phpmyadmin goto your database. Then click the Privileges tab/link chnage the permissions accordingly. There is nothing you can do with php.
  7. Do something like this: [code=php:0]if($POST['jpip1'] >= 1 && $POST['jpip1'] <= 10) {     // valid } else {     // invalid }[/code]
  8. Add the following to your htaccess file: [code]RewriteEngine On RewriteRule ^site([0-9]+)$ gallery.php?id=$1[/code] If you type in site1 it'll called gallery.php with the url parameter id=1 if site99 then it'll call gallery.php with the url parameter id=99
  9. I wouldnt use phpbb! Your client will have to update their forum every week/month as phpbb is full of holes. I'd suggest you go for SMF, whcih we use here, if you want to use a free forum. If you want commercial forum go for Vbulletin rather than IPB.
  10. Prehaps do something like this: [code=php:0]$max = str_replace(array("'", ",", " "), "", $max);[/code]
  11. Add a hidden field called task instead before your submit button: [code]<tr><td colspan="2"> <input type="hidden" name="task" value="2" /> <input type="Submit" value="Submit"></td></tr>[/code]
  12. Add the mysql_error function to the end of the your die clause that way you get an error from mysql which will tell you whats wrong. So use this: [code=php:0]// connect and select a database $link = mysql_connect("localhost", "root", "mypassword") or die ("unable to connect MySQL at this time:<br />" . mysql_error()); print "Connected successfully.<br>"; mysql_select_db("my_database") or die("Could not select the database '" . $db . "':<br />\n" . mysql_error());[/code]
  13. change http://www.google.com to the path you want the user to be redirected to.
  14. We have not purchased anythink. SMF is a free to download and use. As it is open source. You can create a forum by hand if you wish to. Probably take a couple of months to get a good basic forum up and running. There a books out now adays which show you how to create a basic forum. I ceated my own forum from a book i've read. Which is called PHP5, Apache, MySQL Web Developement.
  15. [quote author=bholbrook link=topic=109894.msg443387#msg443387 date=1159486833] 1) Download the files to your computer. 2) Download the trial version of FIREWORKS from MACROMEDIA.COM 3) Click FILE, BATCH PROCESS 4) Select ALL .BMP files and click NEXT 5) Click EXPORT and ADD> 6) Select Settings for JPEG and click NEXT 7) Select OUTPUT location 8) Click BATCH 9) Find something  useful to do for an hour. [/quote] What you dont dont need to do that! You can convert them with gd. However it'll taker a long a time to convert 1200+ bitmaps! Especially if they are large file sizes!
  16. Could you explain in more detail what you're trying to do. ALsi if you want to do a loop within another loop you'll have to use either a while loop, a for loop, foreach loop
  17. [quote author=extrovertive link=topic=109922.msg443501#msg443501 date=1159507003] Ya, I thought of that, but isn't there a PHP way like using ob_flush or something? [/quote] Yes that is correct: [code]<?php ob_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>   <title>Redirecting...</title> </head> <body> You will be redirected to google in approx 2 secounds. <?php header("Refresh:2; URL=http://www.google.com"); ?> </body> </html> <?php ob_end_flush(); ?>[/code]
  18. [quote author=Gruzin link=topic=109934.msg443556#msg443556 date=1159520582] Here is a little example: [code]<?php $var = $_POST['mail']; // something from form $mail =  // add nl2br to it ?>[/code] [/quote] WHy do people do that! I dont get it. Just do: [code=php:0]$mail = nl2br($_POST['mail']);[/code]
  19. No problem. Its what we're here for. We get these sort of questions all the time.
  20. Could you post your current code here along with the query you're using too. I'll be able to adapt a code snippet of mine i used for another member to your needs.
  21. You are checking whether the Parameter1 variable is not set in the code below: [code=php:0]if (!isset($Parameter1))[/code] If its not set, it'll return true. If it is set it'll return false. If you want it to return true when it is set, and false when its not. Then remove [b]![/b] symbol.
  22. This is because replies to threads to the freelancing forum has been disabled. This to prevent discussions forming in the that forum. To contact the person regarding the thread please use the contact methods the poster has stated. If no contact info is stated in the post look out for the envolope icon ([img]http://www.phpfreaks.com/forums/Themes/default/images/email_sm.gif[/img]) under the posters name to email them.
  23. Try doing away with the default charset. SO remove anything matching [i]DEFAULT CHARACTER SET=latin1[/i]
  24. Basically open up the .sql file into a text editor such as wordpad. if you use ntoepad it may become unstable and crash the system. Now find any matches regarding: DEFAULT CHARSET=latin1 and change it to DEFAULT CHARACTER SET=latin1
  25. Do you get any errors at all. Prehaps have a word with your host. Se if they can update MySQL or see if they can get your sql file to work.
×
×
  • 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.