wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
it is becuase you are using addslashes and so addslashes will ad an extraslash infront of another \ to so it preserves \ in the script, otherwise php will strip the \ out. You might want to use stripslashes when sending the email or converr \'s into there html equivilent which is [b]& #92;[/b] (without the space) You can do this by doing this: [code]$message = str_replace("\\", "& #92;", $message);[/code] That code converts a \ in to its html equivilent. NOTE: before using the code above make sure you remove the space between the & and the #.
-
There is an easier way which is manually adding the Edit with Firworks option to the right click menu on a gif file for example. You can do this by doing the following: 1. Open up a Windows Explorer window, such as open up My Documents. 2. Now go to Tool > Folder Options 3. Select the File Types tab. 4. Search for a image file extension such as, GIF, in the Registered File Types area and left click on it 5. Click the Advanced button underneath the Registered File Types area 6. Now the New.. button 7. In the Action textbox type in Edit with Fireworks 8 or whatever version of Fireworks you have 8. In the Application used to perform action textbox click the Browse button. Now in the file browser window navigate to Fireworks.exe file. The path to file should be something like this: [i]C:\Program Files\Macromedia\Fireworks 8\Fireworks.exe[/i] 9. Now click Ok. 9. Click Ok in the Edit File Type window 10. Click Appy in the Folder Options window and click the close button after. Now go to a gif file and right click on it. You should see the Edit with Firworks option and when you select that option the images should open up into fireworks for editing. NOTE: You will have to repeat all the steps above for each and every file extension you like to open up in Fireworks, for example JPG, BMP etc.
-
From looking at your code you use sessions. But you havn't got session_start() at the beginning of your PHP script. In order for your session variaables to work you need put session_start in all files that read and write to session variables, otherwise your session variables wont work at all. So change where it says: [code]<?php if(isset($_POST['save'])) { [/code]to: [code]<?php session_start(); if(isset($_POST['save'])) { [/code]
-
You said you was running the code of the CD with a browser. Then that will be your problem. You cannot run php code within a web browser as it doesnt understand PHP code. A web browser only understands HTML, CSS and Javascript coding lanagages. Now in order to run your php file you need to install a server on to your PC. You can do this easily by installing a software package called WAMP. You can WAMP get [a href=\"http://www.wampserver.com/en/index.php\" target=\"_blank\"]here[/a]. It is free to download and use. Once that is installed open up your browser and type in [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a] Now copy all the php files from the CD to the folder where you have to store your PHP files to be seen by the Apache server. Which I believe is something along the lines of C:\program files\Apache Group\Apache 2\htdocs Now when you go to [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a] again you should see you php files now just click on the php file you want to run. WAMP should now parse your PHP files and an output should be displayed in the web browser.
-
Change the following [code]if($new_username_len < 5){ error_messages::program_error_messages(1); } elseif($username_len < 5){ error_messages::program_error_messages(1); }[/code] to [code]$error_messages = new error_messages; if($new_username_len < 5) { $error_messages->program_error_messages(1); } elseif($username_len < 5) { $error_messages->program_error_messages(1); }[/code] You have missunderstood the use of the scope resolution operator. You can only use it when calling other methods from the class that is being used in, or when you are extending another class. Not when calling classes from within an different class than the one being used in.
-
[!--quoteo(post=372842:date=May 10 2006, 08:12 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ May 10 2006, 08:12 AM) [snapback]372842[/snapback][/div][div class=\'quotemain\'][!--quotec--] Now there's a challenge. Got my thinking cap on. [/quote] Well there is such a script! Its called [b]Nifty Courners[/b] and requires no images and a small amount of CSS! Its done by javascript. The javascript does all the work for you. [div align=\"center\"][!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--][a href=\"http://www.html.it/articoli/nifty/index.html\" target=\"_blank\"]Nifty Couners[/a][!--sizec--][/span][!--/sizec--][/div] I think I might have a little play with this later, oh and its free. If you want to do in pure CSS then take [a href=\"http://www.google.co.uk/search?client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial_s&hl=en&q=rounded+corners+in+CSS&meta=&btnG=Google+Search\" target=\"_blank\"]your pic here[/a] for whole load of articles/tutorials on doing so.
-
I would go with Simple Machines Also why is your host only allowing the use of just those two? Cant you upload premium forums such as IPB or VBulletin?
-
You might want to configure Dreamweaver to use the UTF-8 charset by defualt. You can do this by opening Dreamweaver then if you go to [b]Edit[/b] > [b]Preferences[/b] > and now the preferences window appears select the option from the list that says [b]New Document[/b] Now from the [b]Defualt encoding[/b] pull down menu select [b]UTF-8[/b] charset.
-
There is no way to do it in PHP. But you can with javascript. What you'll want to do is sometying like this: Place this code just before the <head> tags on your script [code]<script type="text/javascript"> function confirmDel() { var del = confirm("Are you sure you wish to continue?\n\nClick Ok to continue"); if (del) { return true; } else { return false; } } </script>[/code] Now the link. The following will be what you link will look like: [code]<a href="delete.php?id=$id" onclick="return confirmDel()">Delete</a>[/code] Change where it says [i]delete.php?id=$id[/i] to where you actually send the user and dont forget to send the and id over the url so mysql deletes the correct data from mysql. NOte the what how the code works is the onclick attribute. Notice that is says [i]return conformDel[/i]. What that does is it will only go to the delete.php page if and onlu of the confirmDel function returns true, otherwise it will not go any where, and thats how you create simple confirm box.
-
If I am correct in think that you want to seperate the day, moth and year numbers into sepearte variables? If thats the case then you'll want to do something like this: [code]$date1 = "10-05-206"; list($day, $month, $year) = explode("-", $date1); echo "date is day $a and month is $b and year is $c";[/code]
-
[!--quoteo(post=372684:date=May 9 2006, 07:26 PM:name=businessman332211)--][div class=\'quotetop\']QUOTE(businessman332211 @ May 9 2006, 07:26 PM) [snapback]372684[/snapback][/div][div class=\'quotemain\'][!--quotec--] ok, since I like your layout a lot better, can i use that layout there, and just change around the coloring, and rework, the names of the id's and classes, back the way I had them, and use that general layout, I look at your copy and my copy, mine isn't laid out as well, and has severe issues in firefox and opera, but yours looks perfect in all of them, is this ok with you. [/quote] You can use the code and do what ever you want with it. I would recommend you to download the site I linked to and play about with the CSS to learn what each bit does. Thats the best way of learning just completly destruct the CSS and put it back together again and have a play.
-
Actually no cookies/session files get deleted from the client or the server. What happens is PHP sets a sessionid in a special cookie which wont work after the user closes the browser or if the script that uses sessesions destroys the session.
-
If you want to run the PHP code first then you'll want to change the action so the form submits to itself, checks whether everthing is valid and the use the header function redirect to the perl script, however you need to pass the POSTed data to perl script in the URL then in per get the GET information from the url. Thats the only way. Or just use PHP to send the email
-
I prefer ids for the tag that is a parent of something, such as the div that contains the links. And then use classes on elements within the parent div such as the unordered list tags or on the links. I hardly use classes. I just seem to use ids more. Also I am not saying use the design I created as its not finished, that was just me playing around with colours. However its the css you want to concentrate on.
-
Thats your problem! Dont use absolute positioning on all elements! You can achive the same affect with the use paddings, margins and floats. It keeps the CSS simple easier to code. I have looked through your css and all elements have absoloute positioning! It is not needed! I see for some odd reason you use an absolute position on your header graphic to clear the space between the top and left hand side of the browser. You can clear this space with setting a padding and margin off 0px on the body tag! I think you need to have a look at the many uses of margins and paddings have! Also I must say you are going the right way with a CSS layout too! Also as a reference I quickly recoded your CSS and changed your classes to ids and added a new div in and came up with [a href=\"http://homepage.ntlworld.com/cshepwood/businessman/freelancebusinessman.html\" target=\"_blank\"]this[/a] That uses floats, margins and padding and not absolute possitioning in site.
-
It should automatically reposition it self, regardless of how much or how little the page has. If you are using floats then on your main tag for the footer use the [i][b]clear: both[/b][/i] attribute, that should sort it out. Or you have a bug in your CSS which is causing this to happen. Also could you post a link to an example of the problem, as I dont quite understand what you mean.
-
Or you can just use strtotime converts a valid date string to a UNIX timestamp.
-
[!--quoteo(post=372493:date=May 9 2006, 03:59 AM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ May 9 2006, 03:59 AM) [snapback]372493[/snapback][/div][div class=\'quotemain\'][!--quotec--] You cant. php runs on the server not the client. You'll need to use javascript. [/quote] Oh, PHP can! Just Use the header function with the refresh method! [code]header("Refresh: 5; URL=http://www.google.com");[/code] Now before you use that function make sure you are not ouputing anything to the browser, Otherwise the function wont work!
-
Usually if you go to Help > then About it has your regsitration details in there. If not then send an email to the software company you bought the software from. Usually they'll be able to resend you your registration details to you if you provide enough evidence that you have bought that software from them.
-
Basically I think in the forum table in the database there is a table row called order. Then when you click a link it increases or decreases the number of the forum order up/down by one and then uses the ORDER BY clause in the query to order by forum order. having a look at code may help clear up what I mean and having a look at the database structure.
-
Basically say['hello'] is an array say is the primary array ($_GET['say']) to get the bits in the [] after say you use $_GET['say']['hello']; You are just setting an array within the url. The print_r function in the code supplied shows the contents of the $_GET['say'] array. I haveing arrays within a URL isn't most pleasent thing to see as can become confusing.
-
You wont be able to delete a cookie of off a users cvomputer. However you can set the cookie with blank values apart from the name and set the expire time sometime back in the past. That should stop the browser from using the cookie again.
-
Yes you can place an array within an array in a ur. Something like this: [code]<?php if(isset($_GET['say'])) { echo '<pre>' . print_r($_GET['say'], true) . '</pre>'; } ?> <a href="?say['hello']=hello&say['world']=world">Set the array in the url!</a>[/code]
-
Oops. I think that might be my fault there. Change this: [code]Print "<td><a href=\" . $row['pet'] . ".html . "\">".$row['pet'] . "</a></td>";[/code] to the following: [code]Print "<td><a href=\"" . $row['pet'] . ".html\">" . $row['pet'] . "</a></td>";[/code] And your error should be sorted out.
-
You cannot edit inside a file you can only append to or rewrite the whole entire file. That is why I said to use [a href=\"http://uk.php.net/manual/en/function.fread.php\" target=\"_blank\"]fread[/a] which you can then you add the contents of the file into a variable. Then use str/preg_replace to do the changes and use fwrite to rewrite the file with changes. For example you have a file called test.txt with the following text init: [code]this sentance has a mistake in it[/code] Now you want to change the sentace to something else. You will do that by doing the following: [a href=\"http://pastebin.com/705891\" target=\"_blank\"]click to see code[/a]