Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Posts posted by wildteen88

  1. Now explain your problem pointing to that code you submitted to pastebin.com. Don't post about the problem about submitting your code to the forum here, but the but the problem your having with that code.
  2. Make sure you have given your frame a name then use the target attribute in your anchor tag. like so:
    [code]"<a href=\"viewContents.php?newID=" .
    $row["new_id"] ."\" target=\"frameNameHere\">View</a>";[/code]
    Change [b]frameNameHere[/b] to the actual name of your frame.
  3. [!--quoteo(post=363934:date=Apr 12 2006, 09:56 AM:name=neewah)--][div class=\'quotetop\']QUOTE(neewah @ Apr 12 2006, 09:56 AM) 363934[/snapback][/div][div class=\'quotemain\'][!--quotec--]

    Heh wonderful i went on their site and the first thing i saw after i clicked security updates was

     

    "MS06-017 - addresses a vulnerability in Microsoft Front Page Server Extensions" (they can't even spell it right lol)

    Cant spell what right? Everything spelt correctly to me.

  4. Yes PHP and MySQL can do this. It is relitvely easy to do. However I would recommend you to go through the PHP tutorials over at [a href=\"http://www.w3schools.com/php/php_intro.asp\" target=\"_blank\"]w3schools.com[/a] before attempting to do what you are doing.

    MySQL, MSSQL, PostegreSQL, Access SQL use SQL but in different ways. They are just different versions of SQL. SQL works with many different databases. I would also recommend you to learn SQL over at [a href=\"http://www.w3schools.com/sql/sql_intro.asp\" target=\"_blank\"]w3schools.com[/a] too.

    Now in order for you to learn PHP and MySQL to the best of your ability I would recommend you to download software package called [a href=\"http://www.en.wampserver.com/\" target=\"_blank\"]WAMP[/a]. WAMP inclclude Apache (web server), PHP and MySQL taht can be installed on to your PC. You can then run/test your PHP scripts from the comfort of your own PC offline rather than having to upload your PHP scripts to your webhost everytime to see any changes or to test them.

    Now I would recommend you to run through tutorial numbers 3 through to 9 over at [a href=\"http://www.php-mysql-tutorial.com/\" target=\"_blank\"]php-mysql-tutorial.com[/a] so you get used to interacting with MySQL with PHP. Also try out tutorial number 12 too as this will help you with transfering data entered in a form to be submited to a MySQL database and extract the contents form the database too. Which forms the basis of what you are trying to do now.

    There are number of books out there on PHP and MySQL that you get. You might want to prehaps go to your local book store/libar and have a look at a few of the PHP and MySQL books to see which ones might help you.
  5. Please post your code over at [a href=\"http://www.pastebin.com\" target=\"_blank\"]http://www.pastebin.com[/a] then post the link to your posted code here.

    Just fill in the form on the main page click Send, then a page should show with your code all formated and highlighted. Now copy the address from the address bar to here.

    The admins are trying to resolve this issue.
  6. change [b]mysql_fetch_row[/b] to [b]mysql_fetch_array[/b] instead. As mysql_fetch_row doesnt return the results with the column names as the indexes of the array, as currently mysql_fetch_row is returning your results like so:
    $nt[0], $nt[1]

    However mysql_fetch_array will retrun the results with the column headers as the array index, ie:
    $nt['id'], $nt['wht'] etc.

    So the following should now work:
    [code]while($nt = mysql_fetch_array($result))
    {
        echo '<option value="'. $nt['id']. '">"' .$nt['wht'] ."</option>\n";
    }
    echo '</select>';[/code]
  7. Something like this should do the trick:
    [code]<script type="text/javascript">
    function showHide(inID) {
        theObj = document.getElementById(inID);
        theDisp = theObj.style.display == "none" ? "block" : "none";
        theObj.style.display = theDisp;
    }
    </script>

    <form>
    <input name="dvd_ship" type="radio" id="dvd_ship" value="same" onChange="showHide('ship_addy')" checked>Ship to address listed above<br>
    <input name="dvd_ship" type="radio" id="dvd_ship" value="new" onChange="showHide('ship_addy')">Ship to this address:<br>
    <br>
    <div id="ship_addy" style="display: none">
    ADDRESS:<br>
    <input name="dvd_shipping_address" type="text" id="dvd_shipping_address" size="25"><br>
    <br>
    City<input name="dvd_shipping_city" type="text" id="dvd_shipping_city" size="15">
    <select name="dvd_shipping_state" class="mainText" id="dvd_shipping_state">
        <option value="State">St </option>
        <option value="Oregon">OR </option>
        <option value="Washington">WA </option>
        <option value="California">CA </option>
        <option value="Idaho">ID</option>
        <option value="Colorado">CO</option>
        <option value="Nevada">NV</option>
    </select>
    ZIP<input name="dvd_shipping_zip" type="text" id="dvd_shipping_zip" size="8">
    </div>

    </form>[/code]
  8. You shouldn't really put parts of your code in uppercase then some areas in lowercase as it makes the code look untidy just stick with one or the other. I prefer to have all my code in lowercase and indented. Such as:
    [code]<div>
      <p>Hello there</p>
      <h1>blah blah</h1>
      <p>what you doing?<br />
        I'm fine you?<br />
        Not too bad myself!
      </p>

      <div>
        Hello
        <div>Something else</div>
      </div>
    </div>[/code]

    [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]BTW: Mober, are you like Obers evil twin??? LOL[/quote]LMAO of with that great comment.
  9. Select code view and type up your PHP! Or if you are lazy click the application tab and chose one of the options such adding a login page, repear region etc. Note in order to use the features in the Application tab you will need to setup a project in Dreamweaver.

    Dreamweaver won't run your PHP code in Design View like it does with HTML instead it'll display as little PHP logo, if this has been setup or just a blank space where your PHP code is located. Dreaweave isn't the best editor for PHP I would recommend you to get something like PHPDesigner 2006 its free.
  10. Any data set in $_SESSION variable should be completly trustworthy as you are the one that sets the session data after all! All session data is stored on the server so the user can not see what session data is being set while they are browsing your site. The only thing you'll want to be warry of with sessions is session fixation.
  11. I use RapidPHP has code highlighting, PHP debugging etc it'll set you back a mear $20 or you can pretty much the as what RapidPHP has features for complety free by getting PHPDesigner 2006 has all the tools you need for programming in PHP.

    However these aint the only two there are thousand of editors out there. Most expensive and the best is Zend Studio as its made by the people behind PHP and so it is packed with tones of features which will set you back a few $1000!
  12. If you are worried about people seeing your PHP code then they wont as PHP is parsed on the server and not by the browser. The only thing the user sees is the output of your PHP code, ie text/html when they go to view > source code in a web browser.

    The aboove also applies when they attempt to download the page too.

    Becuase when a user clicks a link or downaload a file from the server, by going to file save as and its a .php file the server will see its PHP and activate the PHP Intepreter that parses your code. Then it'll return the output to the server and the server thne returns the outputted text/HTML to the web browser which will parse the HTML/CSS/Javascript returned from the output.

    This is how PHP works so I wouldn't worry too much people seeing your PHP code as its a fat chance unless your host misconfigers their servers.
  13. Your new host most probably has the register_globals directive switched off which is a good thing. However any scripts worked on your old host will not work with your new host due to regsiter_globals.

    If register_globals on you can retrieve any variables form the url, posted data, cookies, session like this:
    $varname

    Howver with register_globals off you will need to use the superglobal array varibales which are the following:
    $_POST, $_GET, $_SESSION, $_SESSION etc.

    So for you as you have varibales set in the url you will need to use the $_GET superglobal array like so:
    $_GET['pg']

    You will only use:
    $_GET when you have variables set in the url.
    $_POST when you have form data being submitted with the method set as post.
    $_COOKIE for cookie data, and
    $_SESSION for session data.

    register_globals can be a security issue when its switched on as a vister can reguster a variable and as long as your script has the same variable name you use in ascript they can erase any data that variable holds! However superglobals stop this from happing as an variables set in the url, post'd data, cookies, sessions are categories in their own special variables.

    Have a look at [a href=\"http://www.php.net/variables.predefined\" target=\"_blank\"]Superglobals[/a] over at php.net and have a look at [a href=\"http://uk.php.net/manual/en/security.globals.php\" target=\"_blank\"]Register Globalsp[/a] too for good for a good explanation of why not to have regsiter_globals on.
  14. The way your chatbox refeshes without refeshing the page is the use of AJAX. AJAX allows you tointract will the server whithout having to refesh the browser. Chexk out AJAX over at AJAXFreaks.com.

    ANd this is the line:
    [code] setTimeout( "displayMessage()", 2500);[/code]that refeshes the page to get the messages to display ever 2.5 secounds. In the displayMessage() fucntion it enables AJAX then it calls a file called reload.php as seen here:
    [code] xhr_object.open("GET", "reload.php", true);[/code]
    Which I guess gets the messages out of a file/database and returns it to AJAX, which then displaus the various chat messages using this:
    [code] xhr_object.onreadystatechange = function() {

    if(xhr_object.readyState == 4) {

    var chaine=xhr_object.responseText;
    var contentArray=chaine.split('X');
    var chaineText=contentArray[0];
    var listUser=contentArray[1];
    var object=document.getElementById('mon_texte');
    var userobject=document.getElementById('online');

    if (chaineText.length>4)
    {

    object.innerHTML= document.getElementById('mon_texte').innerHTML+chaineText;
    object.scrollTop=object.scrollHeight;

    }[/code]
  15. Nice design! I like it. However Your site will look a bit more better if it was centered in the browser. SO I chnage this:
    [code]margin: 0 0 0 10px;[/code]That is in your #content div to the following:
    [code]margin: 20px auto 0px auto;[/code]
    That should make your content div centralise your whole site in the center of the browser and bring your page down by 20px rather than having it stuck to the top left which a mear 10px left margin.
    This will cause a little problem for your body background. But if you use a 20pc padding then apply the body background to the content div it should centralise your background so it will only go down as far as the content dive rather than going all the way down the page.

    I'm not too sure about your nav menu under your header. It looks a bit too basic and that light grey on hover doesn't fit in with the site. Prehaps chnage the tect color to a dark grey instead when you mouse over it.

    Also rather than using h1 for all your headers use
    h1 for siteheder and for main headers
    h2 for sub headers
    h3 for sub sections (such as the ones on the left)

    If you get your poage centered and fix that background from repeating past the content div your site design will pretty good!
  16. Dont download Apache2.2 as PHP doesn't support this version, ubless I have missed something.

    Download the following versions:

    apache_2.0.55-win32-x86-no_ssl.msi
    PHP 5.1.5 zip package
    MySQL 4/5

    Dont download the inataller for PHP as its is not needed. All it does is extract the files to the installation folder you choose. So the zipped package is recommended you just extract the files top where you want pHP to be installed to and your done!

    If you're going to do a manual install. I would recommend you to install APache, PHP and MySQL in a file called server in the root of your HD ie (C:\Server\). That all of your Server related programs are centralised in one located and easy to get to. Thi is what your server shojld look like after install:
    Apache - C:\server\Apache2
    PHP - C:\server\PHP
    MySQL - C:\server\MySQL
  17. No! The @ sysbol supresses the errors. Meaning no error is shown and allows the script to continue running as though there is no error.

    take this script for example:
    [code]<?php

    if($_GET['var'])
    {
        echo $_GET['var'];
    }

    ?>
    <a href="?var=hello">Say hello</a>[/code]
    When you run that script for the first time, you'll get the following notice error:
    [code]Notice: Undefined index: var in C:\server\www\test.php on line 3[/code]If you placed an @ just before $_GET the error message will not be shown. ie:
    [code]if(@$_GET['var']))[/code]
    This is error suppression. It doesn't affect what a variable contains it just stops an error message being displayed.
  18. Heres a start for you:

    [a href=\"http://www.php-mysql-tutorial.com/connect-to-mysql-using-php.php\" target=\"_blank\"]Connecting to MySQL with PHP[/a]
    [a href=\"http://http://www.php-mysql-tutorial.com/create-mysql-database-with-php.php\" target=\"_blank\"]Create MySQL Database With PHP[/a]
    [a href=\"http://www.php-mysql-tutorial.com/mysql-insert-php.php\" target=\"_blank\"]Insert Data To MySQL Database with PHP[/a]
    [a href=\"http://www.php-mysql-tutorial.com/php-mysql-select.php\" target=\"_blank\"]Getting data from MySQL with PHP[/a]
    [a href=\"http://www.php-mysql-tutorial.com/mysql-update-and-delete.php\" target=\"_blank\"]Update and Delete data from MySQL with PHP[/a]

    All other tutorials from php-mysql-tutorial.com can ber found [a href=\"http://www.php-mysql-tutorial.com/\" target=\"_blank\"]here[/a]. The tutotials listed above are tutorial numbers 3 - 7 and 9
  19. Now nothings wrong so far. But I dont why but when I see stuff like this:
    [code] $password = mysql_result($result, 0, 'password');
    $name = mysql_result($result, 0, 'name');
    $surname = mysql_result($result, 0, 'surname');
    $address = mysql_result($result, 0, 'address');
    $address2 = mysql_result($result, 0, 'address2');
    $county = mysql_result($result, 0, 'county');
    $country = mysql_result($result, 0, 'country');
    $telNo = mysql_result($result, 0, 'telNo');
    $paypalEmail = mysql_result($result, 0, 'paypalEmail');[/code]It confuses the crap out of me, however It might not to you. But there is a simple to the above which is:
    [code]//put our results into an array ($row);
    $row = mysql_fect_array($result);

    $name = $row['name'];
    $surname = $row['surname'];
    $address = $row['address'];
    $address2 = $row['address2'];
    $county = $row['county'];
    $country = $row['country'];
    $telNo = $row['telNo'];[/code]Much clearner and easier to follow! However this is my personal opinion. But you dont have to change your code if you dont want to.
  20. I was just browsing Google News in the Sci/Tech area and came across a new sarticle on [i][a href=\"http://business.timesonline.co.uk/article/0,,9075-2127600,00.html\" target=\"_blank\"]The web, to go[/a][/i].

    This article talks about an app you can download, Webaroo, which can download the WWW on to your PC/Laptop or mobil devices so you dont have to go online! Genius!

    If you want to download the WWW get [a href=\"http://www.webaroo.com\" target=\"_blank\"]Webaroo.com[/a] Now!

    I have tried it you can either download packets that contain 1000s of websites from the UK, USA etc each averaging at 250Mb or you can dowload single websites. Too.

    I dont see a need for this! You have to be online in the first place to get the updated content and download it to your PC. I dont get it!

    What do you think?
×
×
  • 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.