Jump to content

dtommy79

New Members
  • Posts

    5
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://domain-sector.com/forum/

Profile Information

  • Gender
    Not Telling

dtommy79's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I created a simple script that converts miles to kilometer. I added it to an HTML file and it works fine, but when I load the page (and there is nothing to convert) it gives me an error: So basically what I want is to display nothing on page load or if there is nothing in the input field. Here is my code: <h3 class="section-heading">Convert Miles to Kilometer II.</h3> <hr class="primary"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" style="margin-top: 20px;"> <p>Add Miles: <input type="text" class="form-control" placeholder="miles" name="mile" size="2" /> </p> <p> <input type="submit" class="btn btn-primary" value="Submit" /> </p> </form> <?php $miles = $_POST['mile']; //This is line 130 // How many km is one mile? $onemile = 1.609344; $totalkm = $miles * $onemile; print "<p>$miles miles is $totalkm kilometer.</p>"; ?> Thanks in advance
  2. Hi, I'd like to create a simple script that would do the following: It would be a word learning script (to learn new vocabulary in a foreign language). This is how it should work: let's say 10 words (in my language) are displayed randomly and I have to write the meaning of those words in English next to it. For example, in my language 'apple' means 'alma' The script would display: alma => ___________ I'd have to write apple on the empty line or text field. If it's correct a green checkmark would appear next to it, if not a red cross. I should be able to add the correct word pairs into the script, and it would display 10 word pairs randomly when I refresh the file in the browser. I'd appreciate if someone could point me into the right direction. Thanks
  3. Hi, First of all, I'm not asking anyone to write the code for me, I'd just like someone with more experience to point me in the right direction. I know HTML and a little bit of php. I think the best way to learn more about php is to actually create something. So this is what I'd like to do: I want to create a subtitle website that allows people to submit small .zip files through a form with various fields. then this submission would be listed on the main page (with the details such as movie title, language etc) and people could download it. Should this file be stored in database or in a separate directory? Some kind of backend would also be necessary, I guess, to handle submissions (edit, delete). What would be the best way to start such a project? Thanks
  4. Hi, Im kinda new to php and I'd like to create a simple download page using php. It would look something like this: I want it this simple, but I don't want to allow direct downloads, so when someone wants to download a file he wouldn't see for example: http://mysite.com/myfile.zip instead he would see an id number. How can i do that? Thanks for the help.
×
×
  • 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.