Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. I believe the incredibly simple mistake, is you need to use unlink instead of unset.
  2. $a = Array(1,4,6,8,9,11,15); $b = Array('1-A','1-A','1-B','1-B','1-C','1-D','II-B'); $combined = array_merge($a, $b); //1-A => 1, 1-A => 4 ... $questions = array_flip($combined);
  3. Assuming requests are allowed out of public folder: <?php include('../asset/123.php'); ?>
  4. I listed NVU as a WYSIWYG editor where you can modify aspecs of the page visually. But as for you javascript, there is nothing available that can modify the page directly and save it, You best learn coding properly and do it yourself without a design tool.
  5. He's not the OP, So I don't know what he's doing.. Hehe.
  6. I don't mean to sound offensive if I am, but are you 12? You cannot edit your web page with this code, You can manipulate it but refreshing will remove anything you have done. Dreamweaver is expensive and pointless, you may as well get something free/open source and good such as NVU
  7. You'd use the SimpleXML library that PHP should be installed with: <?php $xml = new SimpleXMLElement($xmlstring); $xml->files->create[2]->check->installed = yes; Don't quote me on the code, but you can easily manipulate XML with the extension: http://www.php.net/manual/en/simplexml.examples-basic.php
  8. Yeah, You're not really clear with your examples of needs of the script. If you tell us what you're trying to do (if we didn't answer your question) then we may be able to find a more useful way of coding for that.
  9. Forward inbound port 80 to your local server port. By the way, What were you expecting? You provide nearly no information you can't expect to get much out of it first answer, have patience.
  10. Why is this in the comments/suggestions section? Try setting it into a variable: $headers="MIME-version:1.0\r\nContent-type: text/html; charset=iso-8859-2\r\n"; $sent = mail("$myemail","$subject","$message","From: $name <$mail>\nContent-type:text/html"); if (!$sent) { exit('E-mail could not send, there was an error. Please try again.'); } But you also don't use the '$headers' variable, you should plug it in if you're wanting to add those specific headers.
  11. All this code is so ridden with errors and disorganization. What are you exactly trying to accomplish with your code? I'm sure there is a much easier solution than the aformentioned ones.
  12. oni-kun

    Cloning a hard drive

    You must rewrite the master boot record in order to be able to read the partition table which is on the new disk, Try accessing the new harddisk with a partitioning program and rewriting it from there, using a program such as gParted or fstab.
  13. Where exactly is your problem? If you're wanting someone to create the script, then please post in the Freelance section otherwise please post a problematic script you have for us to look over.
  14. You should set set the default timezone to conform to E_STRICT error settings and to fix your problem: http://php.net/manual/en/function.date-default-timezone-set.php You should change this value in php.ini or alike, as a wrong timezone can be a problem when coding.
  15. First i'd recommend storing the user's ID in session, so information could be pulled up as needed (such as when you log in, it goes to their profile with info from $_SESSION['ID']). About displaying the information on a profile, Where are you having trouble? It should be fairly straightforward to select the user's data and display the row such as: $id = $_SESSION['ID']; //Get user's ID $result = mysql_query("SELECT * FROM `USERS` where id='$id'"); $row = mysql_fetch_assoc($result); print "Your user name is: " . $row['name'] . " and you registered at: " . $row['registerdated']; And work from there to list results.
  16. Ignore strlen and use regex, As someone could enter "I am coolaid" and it would validate. $phone = '444-444-3444'; print strlen($phone); //Will print 12 //Ensure it is well formed. if (!preg_match('/^[2-9]{1}[0-9]{2}-[0-9]{3}-[0-9]{4}$/', $phone)) { die('Phone number is NOT valid'); } This will check if the phone number is valid and well conformed in '333-333-3333' format.
  17. http://tnx.nl/php.html It's just the way it will be. There's some more insight into your problems with PHP (Atleast compared to PERL), but there ARE also reasons why it is good. http://www.webpronews.com/expertarticles/2005/12/22/asp-vs-php (business perspective) http://pthree.org/2006/01/11/why-php-is-better-than-aspaspnet/
  18. I'm tired and wish not to argue about you for syntax except to say it does not matter. If something as simple as an underline in a function name that was defined for backwards compatibility is a problem for you, then maybe you should stick to a much simpler programming language. You should take a look at http://php.net/quickref.php to see what you're getting into, if you scroll down to 'filesize' then you will notice many functions like it, similarily named and similar in function apt to the language.
  19. PHP is based heavily off of C and will inherit many of the syntax styles and structures/function names of it. I coded with VB.NET for a while and it's incredibly clear the difference in naming conventions, but to an intermediate programmer 'fopen' is much more memorable and efficient than open_a_file_with_this_function(), Albeit an alias function named file_get_contents and file_put_contents exist. It has unicode support, Such as a wide array of multibyte functions, Just no support over ASCII for functions and declarations. Functions are grouped together usually, such as is_array, is_object, is_string, file_exists, file_put_contents (etc etc..) I don't think the need for a 'perfect uniform' syntax is required, it is only but your opinion on this matter, as you may have many complaints about C's constructs. This should be learned. C syntax I would get used to the syntax of these languages, as they are much much more different than ASP-OO style programming.
  20. AddType application/x-httpd-php .jsphp You can keep it a .js if you'd like, but making a new extension for PHP included JS should really be in a separate format, all that would be required is renaming your javascript file you wish to be parsed to ".jsphp"
  21. I'll have to admit the backdrop on the text is a bit unappealing to the eyes sometimes, but otherwise the site design is original. It's sort of an old style, but for that I can't complain. Your answers seem pretty well done, the list of Q&A isn't too bulky.
  22. Are you replacing the said url's parts with your own username and password data? If it asks for a password and then closes the connection (IE it does acknowledge your request) then you aren't using a supported method or your credentials are not correct and it refused to continue the request. What do you mean SSH is disabled? It's disallowed on the server?
  23. That just pins it to the choice of the person who is going to use it, Memory or the amount of is not an issue, other things like harddisk space, screen and keyboard sizes/ergonomics are much more important for a student. [ot]Daniel, answer my PM[/ot]
  24. You do not need to. If you were doing a simple if statement and wanted to separate it, say to add HTML: <body> <?php function checkifarray($arg) { return (bool) isarray($arg); } $array = Array('foo', 'bar', 'baz'); if checkifarray($arg) == false { print "warning!<br/>"; ?> <strong>The array <?php print $arg; ?> is not an array!</strong> <?php } //To end the IF statement above. ?> You do not need to close/reopen, You can simply print the HTML all within PHP, but it allows flexability on working with both scripting languages.
×
×
  • 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.