Frequently Asked Questions: script questions: page: 14
Page 14 of 17 · <1 ... 13 14 15 ... 17 >
-
1
How can I make a textarea field on my form?
Use a code like this:
<textarea name="comments" rows="5" cols="40"></textarea>
All you have to do is change the name (in this case comments) so you know what this answer is about! You can, of course, change the rows number to reflect the height of your box, and the cols number to reflect the width of the box.
Please note: These tags don’t limit the length of a line someone can enter, or how many lines of text they can enter. They simply describe the appearance of the form.
If you want to supply some default text for the text area, you should place it before the </textarea> tag, like so:
<textarea name="comments" rows="5" cols="40">Text</textarea>
May 21, 2004 |
By Louise |
Filed under FAQ, NL-PHPMail, PHP, Scripts
-
2
How can I use a dropdown menu?
Here’s an example:
<p>What's your favorite color?<br /> <select name="color"> <option selected="selected">Please choose...</option> <option value="blue">blue</option> <option value="red">red</option> <option value="yellow">yellow</option> <option value="orange">orange</option> <option value="green">green</option> <option value="purple">purple</option> <option value="black">black</option> <option value="white">white</option> </select></p>
The name in the select tag is the name of the field, the value is what will get sent to you in the e-mail, the text in between the two option tags is what your visitors will see.
To make a certain option selected by default, add ’selected="selected"’ to the input tag, as shown above.
May 21, 2004 |
By Louise |
Filed under FAQ, NL-PHPMail, Scripts
-
3
Can I include two of the calendar files (such as calendar.php and calendar_year.php) on the same page?
Sorry, but no. You will get an error like this:
Fatal error: Cannot redeclare class date_calc in /home/user/public_html/calendar/calc.php on line 31
This happens because calendar.php defines the date_calc function relating it to the month, since it’s just a month calendar. The other two files (calendar_year.php and calendar_bdays.php) define the date_calc function relating it to the year. So, when you try to include them to the same page, the second file you include won’t work.
May 21, 2004 |
By Louise |
Filed under FAQ, PHPCalendar, Scripts
-
4
When I include the file, I get this error: “Warning: Failed opening ‘config.php’ for inclusion (include_path=”)…” What’s wrong?
It means the script can?¢‚Ǩ‚Ñ¢t find the config file. Try to include the full path to the config file. So, instead of
include 'config.php';
you would have
include '/path/to/folder/config.php';
For PHPCurrently, you would have to edit the second line of current.php. For PHPCalendar, it?¢‚Ǩ‚Ñ¢s the fourth line on calendar.php, calendar_bdays.php and calendar_year.php, and/or the second line of list.php, list_bday.php and list_year.
May 21, 2004 |
By Sasha |
Filed under FAQ, PHPCalendar, PHPCurrently, Scripts
-
5
Can I use PHPFanBase without a MySQL database?
Sorry, but no. The script needs the database to store the members in, and at the moment, there is no version available that will work without a database. You may however be interested in BellaBuffs which does not require a database.
May 21, 2004 |
By Sasha |
Filed under FAQ, PHPFanBase: Installation, Scripts