Jump to content

alecjw

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by alecjw

  1. alecjw

    Remove gap

    How do i remove the gap between cells in a table, peferably using css?
  2. is: if(!$var) the same as: if($var==FALSE) and if($var) the same as if($var==TRUE)
  3. What's the CSS eqivelant to img's align="left"?
  4. [quote author=onlyican link=topic=105756.msg422579#msg422579 date=1156632284] Sorry, I will use the the following font-family: Arial, Helvetica, sans-serif; Which I normally do anyway. [/quote] As far as I know, none of those fonts are included in linux. Try: [code] font-family: Arial, Helvetica, Deja Vu Sans, sans-serif;[/code]
  5. alecjw

    Centre a table

    Soz, I meant XHTML strict. I wasn't clear. There is no align attribute in strict.
  6. Hi. I want to centre a table in page, how do i do it?
  7. alecjw

    iFrame error

    An iframe shows the entire page. you have to take the website header out of index1.php.
  8. Do you know binary? I think this is what it means: If $a was 3, for example, its binary would be: 00000011 However, PHP uses signed integers, so we add 128 to it to make 131 which would be represented like so: 10000011 Then we make all 1's 0's and vice versa. 01111100 This is 124, if we subtract 128 from this we get -4, so we know that ~13=-4 Now we can try it for 13. 13+128=141. 10001101 Reversed to: 01110010 Which is 114. 114-128=-14. Therefore we can conclude that what corbin said is half correct. ~$a==-($a)-1 is true if you're starthing with a positive number, but it's ~$a==-($a)+1 if you're starting with a negative.
  9. Probably should, but my warranty isn't void until >150Hz!
  10. [quote]what's your network card by the way?[/quote] Its a Belkin F5D7001uk (http://catalog.belkin.com/IWCatProductPage.process?Product_Id=184329), the 125MBps version of F5D7000uk (http://catalog.belkin.com/IWCatProductPage.process?Product_Id=141055), which is supported... Only the very latest kernel noticies that it's there, but then it thinks that its a wired LAN card and doesn't find any wireless networs when i search. But seeing as its 54MBps counterpart works, I expect that they'll start supporting it soon. THEN I can uninstall Windows! yay! [quote]that will only update your list of repositories[/quote] I told you that I was a newbie at linux!
  11. I've been trying to push my monitor a bit lately, and see what it can do. I've been increasing the frequencies to very high numbers. I managed to get my LCD 17" to do 150Hz, more than double its usual frequency (60Hz). Has anyone ever gone higher than that? Is it safe? What will my monitor do if I force it to do a frequency which it can't? Thanks in advance.
  12. For text areas insert this into your web page: [code] <textarea name="name_of_textarea">This Text will be shown within the textarea</teatarea> [/code] You may want to edit the SQL field for it and make it data type LONGTEXT. For radio buttons: [code] What's your favourite colour?<br /> <input type="radio" name="radio1" value="black" />Black<br /> <input type="radio" name="radio1" value="grey" />Very Dark Grey<br /> [/code] If Black is selected, $_POST["radio1"] will be "black" If Very Dark Grey is selected, $_POST["radio1"] will be "grey" You will probabl want to make the SQL data type ENUM('black','grey') For checkboxes: [code] Do you like pizza?<input type="checkbox" name="pizza" /><br /> Do you like beer?<input type="checkbox" name="beer" checked="checked" /> [/code] checked="checked" means that the checkbox will be ticked by default when the page loads. If pizza is selected, $_POST["pizza"] will be "on" otherwise, it will be "" (empty). There are two ways of storing this data in the mysql database, either: Store it as is with ENUM('on','') OR: Convert it to a 1 or 0 like this: [code] $pizza=$_POST["pizza"] if($pizza=="on") { $pizza=1; }else{ $pizza=0; } [/code] Then insert $pizza into the database (datatype: BIT(1)) For a drop-down list: [code] <select name="dropdownlist"> <option value="option1">The first option</option> <option>Hello</option> <option value="pie">Apple Pie</option> </select> [/code] If "The first option" is selected, option1 will be returned as the value. If "Hello" is selected, Hello will be returned as the value, because if the value is not set, it will be the text between <option>and</option> You will probably want SQL data type ENUM('option1','Hello','pie') for this.
  13. Instead of: [code] while($row=mysql_fetch_row($result)) { //Some code } [/code] Use: [code] $shown=0; $toshow=12; while($row=mysql_fetch_row($result)) { if($show<=$toshow) { //Some code } } [/code] To show the most RECENT mysql rows, put desc after the ORDER BY id bit. (ORDER BY id desc) EDIT: You can change $toshow=12 to $toshow=the number of rows you want to show.
  14. Alec Wright, 13, Male I started learning HTML when I was 10 and I now know PHP, HTML, XHTML, JS, SVG, DHTML (a little), BASH, CSS, XML, XSL, RSS and SMIL.
  15. [quote author=Koobi link=topic=103263.msg411187#msg411187 date=1154956985] i think Ubuntu is the ideal Desktop OS simply because it's easy as hell...but as a server?...hmm maybe with a lot of tweaking. being a server, you'd expect it to be stable, then you must be careful to not enable all the ubuntu repositories because some of the updates on some repositories are not thoroughly tested. i think my favourite server OS is Gentoo Linux because of how well it melds in with the hardware (if you compile via source) and the package manager itself. i believe Gentoo's package manager actually downloads the source and compiles it on your PC unlike Ubuntu for example which would download a mostly preconfigured .deb, generally. I imagine FreeBSD would be more robust as a server but unfortunately, i don't know as much about FreeBSD as i'd LOVE to :) So Gentoo it is, for now. [/quote] With ubuntu, you don't have to download the .deb packages, they come on a CD. Also, updating it is ubeleivably easy, just: [code]aptitude upadate[/code] and everything will be updated off of the internet. I mainly like ubuntu beacause it's very easy to use, I'm only 13 and I'm very new to the world of linux. I'd love to be able to use Ubuntu Linux on my desktop, but it's not compatible with my network card.
  16. What this script is doing is printing: <script language="javascript"> if (confirm ('Have You Finished Creating Your Wedding Page?')) { Then i'ts doing: <? $sql = "UPDATE weddings SET finished='1' WHERE user_id=" . $_SESSION['user_id']; $result = mysql_query($sql) or die (mysql_error()); ?> Then printing: [code]} else {[/code] Then doing: [code]<? $sql = "UPDATE weddings SET finished='0' WHERE user_id=" . $_SESSION['user_id']; $result = mysql_query($sql) or die (mysql_error()); ?>[/code] Then printing:[code] } </script> <? }[/code] Which means that it sends both of the MySQL queries before it prints the page, so itfist sets finished to 1, then to 0, then it prints out the page wheich should look something like this: [code] // Check if the user has finished creating their profile if ($finished == 0) { ?> <script language="javascript"> if (confirm ('Have You Finished Creating Your Wedding Page?')) {} else {} </script> <? }[/code]
  17. Could you use a function within a function eg: <?php function a() { //Some code } function b() { a() //Some code } ?> Or would you need to make function a() global first?
  18. Is TRUE the same as 1 and FALSE the same as 0?
  19. You can't convert JS to HTML, they're two completely different things. JS is a scripting language, html is a markup language. Converting JS to HTML is like converting eating to food, which is impossible.
  20. I'm making a PHP script which I want to distribute under the GNU Public Licence. How do I do this? Do I just say in the readme, "This is distributed under the terms of GNU GPL" or do I have to register it with GNU or something?
  21. try: UPDATE tablename WHERE criteria SET description='$decription'
×
×
  • 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.