Houdini
Members-
Content Count
565 -
Joined
-
Last visited
Everything posted by Houdini
-
There are only three parameters that must be set with mail() as below. You will note that one additional parameter $headers is also used. <?php$to = 'someone@ahost.comt';$subject = 'E-Mail Test with PHP';$message = 'This is just a test of the email to see what it will do.'."\r\n";$headers = 'From: you@yourhost.com' . "\r\n" . 'Reply-To: you@yourhost.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();mail($to, $subject, $message, $headers);echo "Mail has been sent!";?>The $message parameter can not be more than 70 character per line and must be followed with a newline or n. The $headers are optional and would have things like From: Reply-To: (anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-(anti-spam-bcc:))))))))) Cc: or such. Each additional $header should be seperated with a carriage return and line feed or rn To see more about this function go here to mail() in the manual. If you copy the above and make the necessary adjustments to the email addresses and save it to your Xisto site and then just type the name of the file into your browsers address bar it should send an email. I would suggest sending one to your self. NOTE the editor will not allow the back slash "\" so the r and the n should of course have these, also the anti spam stuff was added by the script not me.
-
It is simple if you are under dire circumstances and there is nothing to eat and others about you have expired then when starvation overwhelmes you then it is time to eat comething, flesh from another human and the nourishment it provides is all there is left or you will also expire, mostly due to principles or faith in some religious practice.If stranded and too stupid to catch a fish or trap a rabbit or some other animal or find an edible herb then this question would never be posed, you would have to be locked up in a prison like environment and restricted before you ever had to make a choice of eating the flesh of another human.I Just don't tink I will ever be in such circumstances as to have to make such a choice.
-
Restarting Apache Server
Houdini replied to nightfox1405241487's topic in Websites and Web Designing
/sbin/service httpd reload -
HTML Kit is for HTML editing really great, I used Arachnophilia for years and then tried HTML Kit and never went back. HTML kit will not put phamtom characters into your code, and has many plugins for your use. I also use PHP Designer 2006 for my PHP which has sped up my development of PHP and quck debugging of PHP scripts or snippets. The built in ftp of HTML kit is great because if I want to edit a page or pages on my site I just download it into the HTML Kit editing window make the changes and PRESTO after reupload it is done. I have had trouble using the ftp feature of PHP Designer, probably because I have not really tried to use it and am used to how HTML kit works.If you want a full featured HTML editor with quick preview of what you have done then get HTML Kit and also if you want to work with PHP then get PHP Designer also, they are free and small and quite handy without costing you a thing other than diskspace and the time it takes to download and install them.
-
I have seen these type things happen before not just to you but to others as well, but believe me that it is short lived. I believe that when I had gone from one plan to another that right after the change was made that it did give the impression that I had unlimited disk space, but the next day it was correct. Apparently when the script updates users disk usage and available space it may report stuff that is not necessarily true. I would'nt start loading up the disk space because anything over you set limit will be lost or not even uploaded to your disk space.
-
If you look at the users group you will notice that they are in the Hosted group, so yes they are hosted and have the cPanel, otherwise I would'nt have gone through the trouble of illustrating it for someone who can't use the information.
-
Before you can use a database first you need a database to work with so this post will help you create a database and then make at least one table for it to store your information in. Go to the cPanel and in the second table of options labeled Site Management Tools click the MySQL Databases icon. In the screen that comes up next you will create your new database and take note of any prefix in the illustration below you will notice that it is my username with an underscore _ and yours should be your username_ Now just type in any name that you want and that will create your new database for you. Then you will need a table and using the example that you gave I would add one field to the table the SQL for creating a table is CREATE TABLE tablename {table definitions) So to create a table (lets call it users) the SQL that you could enter using phpMyAdmin (in the cPanel) would look like CREATE TABLE users (id INT(6) NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(40),place VARCHAR(50),age INT(3),sex ENUM('m','f'))That will create a table in whatever your new database is (provided you are in that database) and it will create an autoincrementing id (That is unique) with a name field with 40 characters allowed in the name field, then a Place field with 50 characters allowed in the place field and an age field with an age up to 999 years old and then an enumerated list with two values allowed only which are m or f
-
Create A Site Without Cms But Just Dreamweaver?
Houdini replied to drip's topic in Graphics, Design & Animation
Not really sure what you are wanting, but you can create a site with DreamWeaver but to manage it you really need it to be a content management system. DW is alright for design but not made to manage a site. Site management would include setting permissions for users, moving or deleting posts, adding and or editing content like news or topics. Optimizing the Database, banning users, sending mass email changing the look of the site by rearranging modules, activating or deacitvating modules and or blocks. DW could not possibly do all that. With CMS everything is done right in the site itself, no need for an editor other than what is built in wether it be WYSIYWYG or BB Code. So design the site with DW and manage it with a cms of some sort, even if you have to build your own CMS. -
You have the same statement twice in one code block if(!$link_id) if(!$link_id) error_message(sql_error());try it with just one conditional statementif(!$link_id) error_message(sql_error()); also do you have an error_message() function defined elsewhere? It is not a PHP function, the closet to what your code shows would be trigger_error(string error message[int error type])
-
An online Book that is pretty comprehensive from the ground up. It is bookmarked in my browsers. Great reference with good examples and explainations. Here is a link to it HERE. Hope that will be of some value, you also might want to go to the main PHP site and look at the manual. You can get there at this LINK
-
To delete a row of information the SQL for MySQL would be DELETE FROM tablename WHERE clause To delete a column from a table the SQL would be ALTER TABLE DROP columnname Not quite sure what you are wanting to drop, you might just want to update a table like UPDATE tablename SET column = value, column = value, ... Hope that helps, now you can drop a row or a column or change the contents of a particular column in a database using one of the above SQL queries.
-
Try PHP-Nuke for ease of install and plenty of "themes" and many unofficial support sites. All kinds of blocks and modules and addons for it. Ther home page is right HERE It uses phpBB2 for its forums and you can find ported MODs for it especially if you go to my site since I port MODs for the PHP-Nuke version of PHP-Nuke, send me a PM and I'll give you a link to it.
-
Having used various means of verifying HTML forms I believe that this method of verifying a form to be the best mostly because it does everything on one page. It presents the form on one page and then when the submit button is pressed, if all the required fields are not filled out then it will present the form again with all the fields intact and in red lettering will point out the fields that are required to be filled out in red. It is not possible to click submit using this method even if the user has turned JavaScript off. While it is possible to use javascript to verify that all fields are filled out, if the user has turned off Javascript this method will not work any way. This is done using PHP and if you are hosted with Xisto then why not go ahead and use it. The only thing this form will not do is repopulate checkboxes since they are usually an indexed array (but don't have to be , they could be associative) and I have another method for that but that is for later. You can take this script and modify it after seeing how it works and make it perform the way you would like for it to. This method will use both HTML and PHP in the same page so lets get started. <?php /* this is guarunteed to work it is possible to use <? (short tags but this style works everywhere).*//*Only verify/validate form when it is submitted program name: form.php */if(isset($_POST[submit])){ $error='';//initialize $error to blank if(trim($_POST[username])=='' || strlen(trim($_POST[username])) < 6 ||strlen(trim($_POST[username])) >12){ $error.="Please enter a username between 6 and 12 characters!<br />"; //concatenate the $error Message with a line break } if(trim($_POST[password])=='' || strlen(trim($_POST[password]))< 6){ $error.="Your password must be at least 6 characters in length!<br />";//concatenate more to $error } if(trim($_POST[email])==''){ $error.="An email address is required!<br />"; } else { if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST[email])) { $error="The e-mail you entered was not in the proper format!"; } } if($error==''){//Hmmmm no text is in $error so do something else, the page has verified and the email was valid // so uncomment the line below to send the user to your own success page or wherever (swap yourpage.php with your files location). //echo "script type=\"text/javascript\">window.location=\yourpage.php\"<script>"; } else{ echo "<span style=color:red>$error</span>"; } }?>That ends the PHP part of the script except for some PHP echos in the HTML section. The first line of code checks to see if the submit button has been pressed, it won't do anything unless submit has been pressed so then the code goes right to the HTML part below thiese explainations. The next two if conditional statements check that if the user name and password meet the conditions following the if. In the case of the username if it is equal to '' (blank) OR if the length of the string after PHP has trimmed trailing whitespace is < (less than) 6 OR if the length of username is > (greater than) 12 then it will add to the $error variable and display the message in red because of the style embedded in the script. The || means OR in PHP and in the second if condition it works the same as the username only it requires at least 6 letters or letters and numbers or any printable character. The verification and validation requires a little more explaination becuase it uses a regular expression to test for a valid email address. The first part of the email just checks to be sure that they even enter something and if they did then the else statement checks to see that the email is in a valid format namely a group or alphanumeric or printable charactersthen a "@" symbol then more alphanumeric characters and a "."followed by alphabetic characters. the "," seperating the regex then gives the second part with is theemail to check against. If this test fails then the user will see the form redisplayed with the message "The email you entered was not in the proper format!" will show in red. If there are no errors the last if condition checks if the $error variable is empty or blank and if so then you would remove the comment the(//) in front of the echo "<.... and change the URL to the page you want the user to use. Finally all the concatenated $errors are printed by the else statement. So now all that is left is to write the HTML form. and it is below and is tacked just below the code above these explainations. NOTE Just copy and paste the first section of code and then copy and paste the HTML below right after the the ?> closing tag. <form action="form.php" method="post"><table border="1" cellpadding="2" bgcolor="azure"><!--Put a nice border areound the table and add soft color--> <tr> <td width="20%" align="right">First Name</td> <td width="80%"> <input type="text" name="firstname" size="20" value="<?php echo $_POST[firstname] ?>"></td><!--NOTICE the php in the values--> </tr> <tr> <td width="20%" align="right">Last Name</td> <td width="80%"> <input type="text" name="lastname" size="20" value="<?php echo $_POST[lastname] ?>"></td><!--will echo users input for repopulation--> </tr> <tr> <td width="20%" align="right">Username</td> <td width="80%"> <input type="text" name="username" size="20" value="<?php echo $_POST[username] ?>"> (must be between 6 an 12 characters)</td> </tr> <tr> <td width="20%" align="right">Password</td> <td width="80%"> <input type="password" name="password" size="20" value="<?php echo $_POST[password] ?>"> (Password must be at least 6 characters)</td> </tr> <tr> <td width="20%" align="right">E-mail</td> <td width="80%"> <input type="text" name="email" size="40" value="<?php echo $_POST[email]; ?>"></td><!--Give more room for long emails--> </tr> <tr> <td width="20%" align="right"> </td> <td width="80%"> <input type="submit" value="" name="submit"></td> </tr></table><h3>The Username Password and the E-mail fields are required!</h3></form> Using the code above as a model you can modify it to suit your needs for your own site. The regex used to validate I found at the Zend site and is meant to work with .be or .any two or three character extension in a URL I have just finished working on a script that repopulates checkbox data. After looking all over the net for a tutorial or even asking in forums to make it work, I built my own that works like I want, so if there are enough requests I will post it along with explainations and comments. It takes four pages of code to work, but two of them are almost identical it is just that one inserts data and the other updates the database.
-
The Edit Function That Is Now Available! Is this a mistake?
Houdini replied to Houdini's topic in General Discussion
If it is there I am gonna use it, but why even have a description for an Icon that displays nothing? Maybe they are gonna add some Icons in the future, like maybe an animated blot of lightning or something alongs those lines. -
I just had the opportunity to notice and actually use the Edit button that is part of of looking at a reply I had made and there it was the elusive edit button, This subject has been brought up many times has it now been fixed where it will not upset the credits system to now be able to use this feature, or is it an oversight that will be removed now that I have brought it up. I use the edit when after actually posting I notice a misspelled word or might have left something important out of a post. I have gotten into the habit on this site of trying to look carefully over all posts that I make since I knew that once it was submitted there it was, mistakes and all. Maybe not having the edit was a good thing after all, becuase with it you can alway go correct an error or add something that is of relevence. Hey I just remembered one thing, what is the Group Icon? Last week it was a broken link and now it seems to be...wel a blank space, what is it supposed to be?
-
It is not only free and popular, there is great support for the product, and you can get patches for any security flaws that are found by checking the website every now and then. I use a ported version on PHP-Nuke which makes it more secure by having to pass through the CMS first and there are other things in that version that help with security. phpBB is a great choice for anyone even if experienced with BBSs or not.
-
You need to upload the files with their directory structure intact, the gibberish you are seeing is the function guess_language() and what you showed part of were the language being assigned to an array. Get a good FTP client that will keep the directory structure intact, most all of the new one should do that for you. Then try the install again, if I remember correctly it will even create a database for you.
-
I have used just about all with the exception of vBulletin (cause it costs) and have copies of IPB prior to them charging for it. Mercury Board SMF (new YaBB) punBB and phpBB. phpBB can be just about anything you want with the proper MODs applied to it. There will be some features that each might have that you might be comfortable with but all in all, I would try out all the free ones first before just going out and paying for a BBS and later finding out you like some features of another one.Go ahead and try them out till you get used to how forum software works and then you will be able to more easily decide what you would like in your forum software and the only way to do that is to actually use the various ones, and there will be one that you end up using for one reason or the other.Most all of them use PHP and MySQL, but the way the set up and the ease of use of various features of the product is what you would find interesting.
-
Actually they are selling the CD, the labeling and the shipping, the software is free. Some people have slow and unreliable or perhaps no connection to get the browser in the first place then having the physical media (a cd in this case) is the only way and they should be willing to pay for manufacture (buring a cd) labeling, and shipping the product with a fair amout of profit. Would you make cd and offer them for free to those that want the software and you had 10,000 orders even at a cost to you of only 10 cents per cd for burning labeling and shipping it would cost you $1,000.00 dollars to give it away.
-
WAMP will install on any Windows machine even Win 95 but it would be sloooooow, I crashed my XP por and now am using XP Home there is no difference, except I use XAMPP because it allows me to switch between PHP 5 and PHP 4 plus it has a mailserver built in. but you can use WAMP just as easy on WinXP Home with no problems.
-
What's The Dirt On Your Mouse ? What Is It Called ? What is that?
Houdini replied to szupie's topic in General Discussion
As stated above it is a buildup of all kinds of crud, and since most people have their hands on the mouse most of the time except when actually using the keyboard it will build up. I just cleaned my mouse after reading your post so now it is as clean as the day I bought it. -
That is because in Germany there is a law against that one particular form of speech and is a jailable offense as you will see by this little snippet of news. The German Government is quite sensitive about the Holocaust and there are laws enacted, it would be akin to the fact that it is against the law in the US to yell fire in a theater when there is not one due to the panic and possible loss of life when a stampede for the exit ensues in a dark theater, sure you can say it but you will go to jail if caught because it is a law.
-
George Bush did not start a war with Iraq his father entered a war that was sanctioned by the United Nations which is usually referred to as the Gulf War, however that war did not end, it merely had a cease fire after Iraq was removed from Kuwait and most of Iraq military was defeated either by killing them or capturing them or they fled the military and deserted. Saddam Hussein was allowed to remain in power during the cease fire but there were restrictions and conditions placed on Saddam Hussein to prevent the resumption of the war (Gulf War) and one was a no fly zone for Iraqi aircraft plus Iraq was firing at United States Aircraft enforcing the no fly zone (that in itself was a violation which could have resulted in resumption of war) plus he was to allow inspectors to check facilities (this ended up being a farce) which he kicked out of Iraq in 1998 that also could have resulted in resuming the war (Gulf War). I could go on and on. Bush did not lie that Saddam Hussein was a threat not only to the United States (remeber Saddam tried to have the first president Bush assisinated) there were terrorist traning camps in Iraq where terrorists were training in actual aircraft fuselages to practice hijacking an aircraft. I believe that the jets that were flown into the Twin Towers were hijacked by terrorists. A weapon of mass destruction needs to be more clearly defined, any chemical, biological, or radiological agent can cause mass death or fatal illness. Serin gas, mustard gas nerve gas, anthrax, smallpox and other biologicals can be contained easily in a one gallon container and wipe out an entire city. The Air Force General that was second in command in Saddam Husseins military saw the movement of biological, chemical, and radiological agents and apparatus to produce the aforementioned agents or devices. They were placed into 747 that had had all the seats removed and flown to Syria as well as placed on trucks just prior to the United States resuming the origional Gulf War (not start a new one). Just last week there were twelve hours of tapes of Saddam Hussein released and translated by one of the weapons inspectors that reveal the plans to move these weapons and how to hide such from inspectors or prevent inspectors from ever finding anything of value. You can believe anything that you wish but that does not mean that it is true or even right to have such a belief.
-
How To Get Two Web-forms To Work Together ?
Houdini replied to NewGuyinTown's topic in Websites and Web Designing
Your login wil simply not work with the code that you have and the comment form is incomplete as well. Here is what I saw viewing your page source: <tr><td align="left" valign="top" width="150" height="100%"> <font size="2"> <b>Login:</b><br /> Username:<br /> <input type="text" name="username" size="15"><br /> Password:<br /> <input type="password" name="pass" size="17"><br /> <input type="button" value="Login"><br /> <div align="right"><font size="1px"><a href="registration.php">Register</a></font></div>There needs to be a form for that to work, the browser merely sees a text box input for a user name and then there is a password input box also, but there is no form tag as in <form action="login.php" method="post> and a button with the value Login (it should be a submit button with a value of login that button will not do anything. Then you would need to close the form with </form> Then at least you have the beginnings of a form for the comments and it may or may not work, but the login as pointed out above definately won't. The code for the comment box that is shown on the site also need to have a closing tag for the form as in </form> normally right after the submit button. Try fixing the first form and give it a script to be executed with after someone enters a username and password. Your form will need to check against a database or flat file to check the username and all for the login to ever have a hope of working.