Jump to content

MarkT

Members
  • Posts

    168
  • Joined

  • Last visited

Posts posted by MarkT

  1. It doesn't matter whether PHP generates the HTML code or you type it by hand or whatever else, the browser doesn't care about that. It will work if the HTML is formed properly. Among other things, that means the select element needs to be inside a form element. echo '{$option}' That's going to print the text "{$option}". There's no reason to wrap it in quotes: echo $option;
    I got most of it right :P
  2. is this mean there is no way to handle this issue using php??
    I don't really get what you're saying, but i assume;
    <select name="drop"> <option value="1">One</option><option value="2">Two</option></select>

    Then On your HTML Form Action document.For this demo; bob.phpcontents:

    $option = $_POST['drop']

    Then

    echo '{$option}'

  3. I'm trying to write a function that converts plain text into paragraphs wrapped around <p> tags. Here's an input/output example: Input: $text = <<< OUT Paragraph 1 Paragraph 2 Paragraph 3OUT; Output:$text = <<< OUT <p>Paragraph 1</p><p>Paragraph 2</p><p>Paragraph 3</p>OUT; Can anyone give me a hand? Thanks a lot.
    if you're using PHP fwrite,use
    <?PHP $content = WHATEVER YUO WANT."\r\n"; $file = 'filedirectory.txt'; $fp = fopen($file, 'a'); fwrite($fp, '<p>');fwrite($fp, $content);fwrite($fp, '</p>'); fclose($fp); ?>

    I use the above code to track IP addresses to certain pages on my CMS. so it writes <br /> after, ie.fwrite($fp, $ipaddress);fwrite($fp, '<br />'); etc. Hope I Helped!

  4. I've got a very basic form on this page: http://www.jellicled...w/contact.shtml and before I add functionality (will probably need php anyway), I'm trying to get half the code to stop appearing in the comment box. It happened when I took off another input button that was above Submit in the code. I've played about with it a few times, may be closing or not closing tags wrong, or, who knows..?
    To reiterate the point above,where you have <textarea name="comment"> YOu MUST HAVE A </textarea> after it, so it should look like this;
    <textarea name="comment"></textarea>

  5. So i can remember ages and ages ago I had a page that could have a form and on submit the form would send an email to myself with the details. Now when I try to recreate this all it does is open the users default mail program. Am i mistaken or can you get it to send an email immediately from the website without using php etc. ty
    once again,PHP is what you need here,Use a HTML Form,and the PHP email located here;http://www.w3schools.com/php/php_mail.asp So set the $to = Your email and then use a HTML Form POST method, to get the email address of the user sending, and put that as a variable, then use that in the $from field.etc
  6. hey im having a problem, im trying to get the width and height to display in all browser because its 100% i have a top div which have a width of 100% but it does not display 100% dds1.com/killers/home.php on comodo dragon, FF, opera and chrome the width display as 100% but in chrome the height doesnt display
    I recommend making these:width: 110%;margin-left: -10px;margin-right: -10px;and adding padding, this makes the div's width cover everything.
  7. I want to create a HTML Submission Form Like this page : http://bdjobspaper.b...-your-link.html Please prodive code not any widget . Thanksrubel
    I suggest using PHP,Create A HTML Form, using POST method & action=submit.phpthen in submit.php
    $name = $_POST['name'] $email = $_POST['email']$link = $_POST['link'] INSERT Into {TABLE NAME} VALUES ('{$name}', '{$email}', '{$link}')

    Then on the links page,

    SELECT link FROM {TABLE NAME}

    and then echo the results in a table.

  8. I couldn't figure out the best place to post this, but if I wanted to create a website that would enable guests to post comments (possibly registered as well), what would I need to know coding-wise?
    All i can suggest,is using PHP with HTML Forms.
     <form type='submitcom.html' method='POST'>Name: <br><input type='text' name='name'><br>Email: <br><input type='email' name='email'><br>Comment: <br><textarea name="comment"></textarea><br><input type='submit' name='submit' value='Login'></form>

    Then;

    [color=#880000]<?PHP [/color] $name = $_POST['name'][color=#880000]$email = $_POST['email'][/color][color=#880000]$comment = $_POST['comment'][/color] mysql_query[color=#666600]([/color][color=#008800]"INSERT into {TABLE NAME} VALUES ('{$name}', '{$email}', '{$comment}') [/color][color=#666600]?>[/color]

    Then in the place where you want the comments;

    [color=#000000]<?PHP [/color] mysql_connect [color=#666600]([/color][color=#880000]host,username,password,dbname);[/color] mysql_query ("SELECT * FROM {TABLE NAME}") ?> 

    Then echo the results of the select,and style the echo into some sort of table.

  9. How do I hide a music player control bar? I need background music but do not want to see the control bar on screen. I have tried <embed> with control height and width set to 0.I have tried <object> with control height and width set to 0 but still get Quicktime, Real, VLC control bars showing.
    Put it inside a DIV,for example;
    <div id="player"> Player Code Here</div>

    then CSS;

    #player {display: none;}

  10. Here is my purposal that I gave to my supervisor, see it and you will understand what I want:Project Title:Online Center / School Admission SystemAbstract:The objective of this project is to avoid tiresome and time-consuming process of getting admission in a center or school. Parents and individuals face the several hardships in visiting the place several times. It saves much time and money of the parents and individuals to get admission in the desired institute.Admission is necessary part of every student’s life. Parents of a child have to get their child admitted in a school or center.This online admission system allows students and parents to get admission just by sitting at home. The system asks for all the necessary information of a student and keeps it in the database.Purpose of the project:• To manage online admissions• To help the institute administration keep the record of admission online• To help students and parents get admission in the desired institute easily• To save time and money in applying just by sitting at home
    I recommend using PHP with SQL and HTML/CSS create a user system,with a login, and a dashboard, with a HTML form on a page, for example; name, admission place etcdeclare the variables in PHP with Post method. on submission run SQL querymysql_connect ([color=#444444]host,username,password,dbname);[/color] [color=#ff0000]$name = $_POST['name'][/color][color=#ff0000]$class = $_POST['class'][/color][color=#ff0000]$level = $_POST['level'][/color] mysql_query("INSERT into {TABLE NAME} VALUES ('{$name}', '{$class}', '{$level}') ?>For example (Thats one i sent to someone earlier :P)http://w3schools.invisionzone.com/index.php?showtopic=47661&pid=264267&st=0entry264267 then create an admin panel;and declare$name = mysql_query("SELECT name FROM {TABLE NAME}");$class = mysql_query("SELECT class FROM {TABLE NAME}");$level = mysql_query("SELECT level FROM {TABLE NAME}"); then echo '{$name}' etc.... in the admin panel as a form. If you dont understand let me know
  11. I am creating an admission form which will ask for the information such as name, class, level, and such other information, so, I don't know how to connect to the database and how to make the database and how the database will store all that information. Can anybody explain it with real example with the code?
    Basically;
    <?PHP mysql_connect ([color=#444444]host,username,password,dbname);[/color] [color=#ff0000]$name = $_POST['name'][/color][color=#ff0000]$class = $_POST['class'][/color][color=#ff0000]$level = $_POST['level'][/color] mysql_query("INSERT into {TABLE NAME} VALUES ('{$name}', '{$class}', '{$level}') ?>

    For the bits in red; this is based on you using a HTML form using the method = POST For example;

    <form type='submit.html' method='POST'>Name: <br><input type='text' name='name'><br>Class: <br><input type='text' name='class'><br>Level: <br><input type='number' name='level'><br><input type='submit' name='submit' value='Login'></form>

  12. I know that get is a superglobal array and that is seen anywhere in the script. I know also(and tell me if I am wrong) that it is related with links...I mean you a pass a value to GET with a link. Recently though, I came across with a scenario where the input of a user in an input box was grabbed by a GET['action'] variable. Here is the HTML-it is a tutorial on AJAX:
    <form name="autofillform" action="autocomplete.php">			<table border="1" cellpadding="5">				<thead>					<tr>											<th><strong>Composer Name:</strong></th>						<th><input type="text"  size="40" id="complete-field"  onkeyup="doCompletion();"></th>					</tr>				</thead>				<tbody>				  				</tbody>			</table>		</form>

    IN general do user inputs in an input box(search...as in this example here) get "grabbed" from GET['action']?

    With GETYou need;To specify the method.and the action.The form will then (Upon submission) go to the urlIn your case;autocomplete.php?complete-field={INPUT HERE}then you can use getfor;$_GET['complete-field']and that will give you the variable defined in the URL by the form.
  13. Hello,I'm experiencing a few problems with my CSS.i currently have;#search { width: 300px;height: auto;color: #FFF;margin-left: 30px;display: inline-block;}#bar {margin-left: -15px;margin-right: -15px;margin-top: -12px;width: 110%;height: 50px;background-color: #000;position: fixed;border-radius: 3px;padding-left: 15px;padding-right: 15px;padding-top: 12px;}#title {width: 200px;height: auto;margin-top: -10px;margin-left: 20px;background-color:#000;opacity: 0.5;border-radius: 2px;color: #FFF;} and HTML wise;<div id="bar"><div id="title"><h1 color="#FFF">PitchIT</h1></div><div id="search">Search Here</div></div> However,I get the 'PitchIT' text on the line,and the 'Search here' is on the line below, despite my display: inline; Any help?

×
×
  • Create New...