wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
[!--quoteo(post=369819:date=Apr 29 2006, 07:14 AM:name=askjames01)--][div class=\'quotetop\']QUOTE(askjames01 @ Apr 29 2006, 07:14 AM) [snapback]369819[/snapback][/div][div class=\'quotemain\'][!--quotec--] "$mg2->activeskin/settings.php" so $mg2 is a Class Object. and activeskin is a function? am i right? and settings.php is a file where the right configuration of the skin is stored? are all my thoughts are correct? any opinion please? [/quote] Yes your thoughts are right but: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]and activeskin is a function? am i right?[/quote] is a little wrong as its a variable not a function
-
The reason why your sessions are being set with null values is because you aren't sertting a value for the sessions. You are doing: [code]<?php .... session_resigter("design"); ?>[/code]and thats it! That will create the design session variable but wont a set value to the session. To set the valye to the design session variable you do this: [code]$_SESSION['design'] = "someValue";[/code]or if yo uhave register globals on you'll do this: [code]$design = "someValue";[/code] Aslo your SQL query are alittle wrong too it shoudl be this: [code]mysql_query("INSERT INTO ppl_online (session_id, activity) VALUES ('".session_id()."', now()") or die (mysql_error());[/code]
-
This is not possible with PHP. However if you combine AJAX with PHP this is possible!. Take a look at [a href=\"http://www.phpbuilder.com/columns/kassemi20050606.php3\" target=\"_blank\"]this (part 1)[/a], [a href=\"http://www.phpbuilder.com/columns/kassemi20050613.php3?aid=923\" target=\"_blank\"]part2[/a] turorial for an example. When you go through that tutorial you'll enad up with [a href=\"http://www.phpbuilder.com/columns/products.html\" target=\"_blank\"]this[/a]
-
It surpresses error messages, which means it hides the error message which is good on a production server (live site) but not when you are on devlopment server (making your script). Take this example: [code]<?php if($_GET['var'])) { echo $_GET['var'] . '<br /><br />'; } ?> <a href="?var=hello">Set $_GET['var'] </a>[/code] When you run that code depending on you error reporting level and whether display errors is enabled you'll get an notice message like this: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Notice: Undefined index: var in path/to/file.php on line 3[/quote] When you add the @ symbol in front of the $_GET['var'] variable it wont show the error message. Hope that helps. I dont really recommend the use of the @ symbol, unless it is really nessecary, as it is a from of lazy programming.
-
Just as I though, You have a missing [b]'[/b] on this line: [code] echo '<p><font color="red">You forgot to enter your name!</font></p>;[/code] Notice there is no ' before the ; in the above code. To solve this just put a ' before the ; so you line is like this: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] echo '<p><font color="red">You forgot to enter your name!</font></p>[!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--][!--coloro:red--][span style=\"color:red\"][!--/coloro--]'[!--colorc--][/span][!--/colorc--][!--sizec--][/span][!--/sizec--];[/quote]
-
Looking at your code it is fine. However I think the error is comming from above line 28.
-
If you want to edit it then just opening in notepad or anyother text editor do just fine. If you want to run the file then upload it to your webshot and run the file like do with a html file.
-
Want password field embedded into html page
wildteen88 replied to mfaerber's topic in PHP Coding Help
Why javascript? It is not secure to password protect a page with javascript as it is easy to bypass the password login, but simply disabling javascript. With PHP is much more secure as the password cannot be seen by anyone. -
To use addalshes you just do this: [code]$var = addslashes($var);[/code] Also its not two \\ but one.
-
The reason why your emails are being sent twice is becuase you are using mail twice: [code]mail($to, $subject, $message); //remove this line if (mail($to, $subject, $message)){ print "The email has been sent"; } else { print "The email has not been sent"; } ?>[/code] You dont need it twice only one. so remove the first instance of the mail function from your script.
-
personal site http://www.shaundaniels.com
wildteen88 replied to sdaniels's topic in Website Critique
I would like to point out that loggin out was a pain as your code seems to go in a continuous loop and so FF kept comming up a confirmation message and I had to quickly press Ctrl + W to close the tab as it was stuck in a continuos loop. -
personal site http://www.shaundaniels.com
wildteen88 replied to sdaniels's topic in Website Critique
Your site isn't too bad especially that you have just started with PHP. One I dont like is as soon as I go to the page it tells my I have to sign in! What do I have to sign in for, wheres the bit about what I'm signing up for and whats the site about? One change you can do is completlly remove that horrid email link and replace it with a contact form. As PHP can send emails, have a look at the mail function for more info. Also on the register page I noticed you have your login button miles away form your login form. Also the text says Submit Query. I would change that to Login or to something (use the value attribute on your input tag for your submit button) if I was you and move the button more towards the login form. Anyway not a bad site but the design needs to be woked on and a bit more information needs to be added too, in orderto persuade visitors to register. Also it would be nice if you could provide a nice demo account too just so users can get a taste of what would be expected when they register. -
I think its to do with your blank value you are sending to MySQL. Try this instead: [code]$add_address = "INSERT INTO address VALUES (NULL, '$_POST[address]', '$_POST[city]', '$_POST[state]', '$_POST[zipcode]')";[/code]
-
Use file_get_contents or fopen, for example: [code]<?php $file = file_get_contents("mainnews.php"); echo '<textarea name="textarea">' . $file . '</textarea>'; ?>[/code]
-
Unfinsihed script - code being displayed instead of what i expect
wildteen88 replied to adamscybot's topic in PHP Coding Help
I believe the open php tag is short tag and so your server doesn't have php_short_tags enabled. Instead replace any occurance of [code]<?[/code] with [code]<?php[/code] -
PHP creats a cookie on the users computer which contains the session id. PJP creates a cookie every time you intiate session_start if PHP was unable to set a cookie it puit the PHPSESSID in the URL instead or as a hidden form field, if you are using forms.
-
Your if statement should be this: [code]if ($file_type == "image/jpg" || $file_type == "image/png" || $file_type == "image/gif")[/code]
-
If you are getting that error messahe then that error is usually due to an error in your SQL query. To see why your query is failing change this line: [code]$result = mysql_query("SELECT * FROM personnel",$db);[/code] to: [code]$result = mysql_query("SELECT * FROM personnel", $db) or die("SQL Query error: " . mysql_error());[/code] Now by looking at your query evertink is fine, but I have a feeling you have mistyped the table name (personnel). If you dont understand the error message that will be returned when you run your code again then post it here and we'll explain why.
-
The W3C Validator only validates HTML and CSS. You cannot validate your PHP code as there is no set standard to PHP. However HTML and CSS do the people that set the standards are W3C. Why are you trying to validate your PHP?
-
This should work: [code]<?php print"Blog now online! <a href=\"#blog\">full story...</a>"; print"RSS News feed avaiable! <a href=\"#rss\">full story...</a>"; print"Guestbook & Forums go live! <a href=\"#forum\">full story...</a>"; print"Site Launch!<a href=\"#launch\"> full story...</a>"; ?>[/code] Also as its just html there is noneed to use the print statement at all just do this: [code]Blog now online! <a href="#blog">full story...</a> RSS News feed avaiable! <a href="#rss">full story...</a> Guestbook & Forums go live! <a href="#forum">full story...</a> Site Launch!<a href="#launch"> full story...</a>[/code]
-
The problem is becuase you are not escaping your quotes. As you are starting your print statement with a double quote ( " ) mark. PHp will stop the printing your text when it finds another occurance of a double quote. Now in order for PHP to not stop when it finds another double quote you will need to escape it, which means adding a forward slash infront of the quote like so: [b]\"[/b] however your last ending quote shouldn't be escaped though. So what I'm saying is this if you start of with a double quote, you should escape any doubles quotes within the string like so: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]print "Site Launch!<a href=[!--coloro:red--][span style=\"color:red\"][!--/coloro--][b]\"[/b][!--colorc--][/span][!--/colorc--]#launch[!--coloro:red--][span style=\"color:red\"][!--/coloro--][b]\"[/b][!--colorc--][/span][!--/colorc--]> full story...</a>";[/quote]
-
I have tried the above code and it worked fine. If it isn't working for you then the $_POST['email'] is either not setup or you dont have a form field called [b]email[/b]. When you echo out $_POST['email'] does it return a value when you submit your form?
-
Basically you have an error in your code. If you post your code here we'll be able to help you. BY looks of things you're missing a clossing brace before or on line 44. If you could post lines 40 to 45 here then we'll be able to help you alot more.
-
As james said no one will do all that for you. If want someone to do if for you then you will need to post a thread over at the PHP Freelancing forum asking someone to do what you are wanting to do. Now for what you are wanting to do is simple when you know how. What you will want to do is learn HTML so you can create your upload page/form and a bit of PHP for the uploading part. What you need to learn with PHP is how to upload files to the server with PHP which you can do by going through [a href=\"http://www.tizag.com/phpT/fileupload.php\" target=\"_blank\"]this turorial[/a] over at tizag.com while you are at it you can learn how to use forms too which can do by going [a href=\"http://www.tizag.com/phpT/forms.php\" target=\"_blank\"]here[/a]. If you want you can go through all the PHP tutorials over at tizag.com too.
-
For what you want to do it would be best to use a table, like you have done with the Customer details bit. Also you say the working Test html file is working but its not, FF fails to apply the widths to your divs. Only IE7 displays it correctly.