Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

AliasXNeo's Achievements


Newbie (1/5)



  1. Open up signup.php and copy and paste line 1-16 here.
  2. \n will only create a new line in the sense of source. If you look at the source of your page you will see that T-Shirts Posters Calenders are all on a different line. To visually see this line you must use HTML, AKA </br /> :p
  3. Double check the chmod, and try to supply full file paths rather then local ones. For instance a full file path for me would be: [quote]/home/alias/public_html/test[/quote] If that doesn't work I would look at the specifics of the directory, or if this is on a remote server talk to your host.
  4. What did you expect to happen? You must be new to classes. In a function, variables that are not set with global are completely local to the function. So if you made a function that set some random variable, then made another that printed that variable out, it wouldn't work because the random variable you made was only local to the first function, and not the second. Now, in classes you can create variables that are local to the class, which would also make them local to all the functions inside that class. Here is an example: [code]<?php class test {     var $testing = "";     function set_test()     {         $this->testing = "testing"; // Set's our local variable $testing to "testing"     }     function echo_test()     {         echo($this->testing); // Echo's our local variable testing     } } $class = new test(); $class->set_test(); // Set's our $testing variable to "testing" $class->echo_test(); // Displays "testing" ?>[/code] As you see we simply reference our local class variable using $this, as you would reference a local function. Did that clear things up?
  5. Well, i'm going to explain what I think you're saying. You want to check for a row with a certain id number and display an error if another value in that row is above zero. [code]$sql = "SELECT * FROM `table` WHERE `id` = 1 AND `othernumber` > 0"; $result = mysql_query($sql); if (mysql_num_rows($result) {     echo "ERROR!"; }[/code]
  6. Advanced PHP Programming A must read for a true PHP programmer. It goes over design patterns, core PHP 5 techniques, and much much more. I thought I had nothing more to learn about PHP, then I read this book, definently proved me wrong. It runs about $49.99 on shelves, $32.99 on Amazon. A+ on this book
  7. That would be cool, but i'm not the government and sadly don't have access to such technology xD
  8. Thank you for staying positive. I could not find a better forum to properly place this thread, I figured if it truly was in the wrong area a moderator could move it, but this best fits the subject as it's related to PHP and I am asking for help. I simply need ideas. Generally I can take two or three people's idea's and combine them togeter to form my own unique idea, but i'm not 100 other PHP programmers, and I can't come up with an idea that I can assure will please most of the population that attends my site. Whereas, when I have multiple ideas, I can please each one and have a better shot at getting more activity to my website due to it's unique idea.
  9. lol @ your stupidity? I assure you whoever shares their ideas will be given a chance to participate IF I even use it. Besides, me and my team would be the one doing all the work, credit would surely be given, but the website that is being created is not for money, the only money we will recieve is donations, and all that will most likely be going to our hosting bill. (Which we are already paying right now).
  10. Hello all. If you're reading this topic I am going to expect that you know something about PHP. I'm here to collect information. My question: [b]What do you want out of a PHP website?[/b] What is something you look for but can never find? What are some ideas that you think are great, but never bother to actually go through with? Just share your suggestions on what a good PHP website should offer. And please stay in reality here, I don't want some impossible to do suggestion :p Thanks! ~ Alias
  11. Okay, here I have put together two functions. One creates a table, the other creates an entry, except neither are doing the original intention. I get no errors, and it 'seems' to work fine. The two functions are held in a PHP file, I will display all my code in the best manner I can: sqlfunctions.php > This is where the functions are held: <?php function create_table($tablename, $values){ $VString = join(', ', $values); $query = 'CREATE TABLE ' . $tablename . '(' . $VString . ')'; $result = mysql_query($query); print 'Created table $tablename'; } function insert($tablename, $parameters, $values){ $PString = join(', ', $parameters); $VString = join(', ', $values); $query = 'INSERT INTO $tablename ($PString) VALUES ($VString)'; mysql_query($query); } ?> Install_Login.php > This script was supposed to create a table for login use using the function above: <?php include 'Php/sqlfunctions.php'; include 'Php/connect.php'; $name = "newlogin"; $Values[0] = "id int(6) NOT NULL auto_increment"; $Values[1] = "user varchar(15) NOT NULL"; $Values[2] = "password varchar(15) NOT NULL"; $Values[3] = "PRIMARY KEY (id)"; $Values[4] = "UNIQUE id (id)"; $Values[5] = "KEY id_2 (id)"; create_table($name, $Values[]); mysql_close($conn); ?> Create_User.php > This script was supposed to create a user in the table using the function in the function script above: <?php include 'Php/connect.php'; include 'Php/sqlfunctions.php'; $pars[0] = "id"; $pars[1] = "user"; $pars[2] = "password"; $values[0] = ""; $values[1] = "Josh"; $values[2] = "josh7234"; $name = "login"; insert($name, $pars[], $values[]); mysql_close($conn); ?> So nothing is working. Would someone mind helping me get all this fixed, as with no errors I am clueless to what is wrong.
  • 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.