wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
forms/variables/cookies+sessions help me please
wildteen88 replied to jwk811's topic in PHP Coding Help
Post the code in form2.php, if its more than 10 lines post lines 3 - 8 here. -
If yoiu use persistant connections (mysql_pconnect) yes you do. However if you are not you shouldn't have to close the database connections, as PHP does this for you at the end of parsing the script. You or your host may set a max connections setting too low.
-
use the [nobbc][img]IMG URL HERE[/img][/nobbc] tags.
-
Is the $photo hold the path to thier picture. You can probably do this: $photo = (isset($photo) && !empty($photo)) ? $photo : 'path/to/defualt/image/here.gif'; That checks if $photo is set and that its not empty. If is int i'll use the $photo. Otherwise it set $photo to "path/to/defualt/image/here.gif" Change path/to/defualt/image/here.gif to the location of your defualt profile image.
-
You could have a predefined template and where your variables are supposed to go. For for example you have something like the following where your variables are supposed to go {your_var_name_here} To replace that with the actuall variable use str_replace. You can create the file too with the use fopen, fwrite and fclose.
-
I got just the site for you [url=http://www.php-mysql-tutorial.com/]php-mysql-tutorial.com/[/url]. Go through tutorial numbers 4 through to 7. Go through number 3 first for the SQL basics. What you learn there should help you complete you mini assignment.
-
You need to escape the square brackets like so: [b][nobbc]/\[b\]/[/nobbc][/b] Also Id recommend you to do your BBCode in pairs, so the regular expressions will look like this: [b]/\[b\](.*)\[\/b\]/is[/b] Notice the i and the s at the end of the regular express this tells the PCRE Engine to be case-insensitive and to ignore newlines/carriage returns. So if you did this: [nobbc][b]something something else here and agaig[/b][/nobbc] It'll parse it, whereas if you didnt have the s modifier it will stop once it gets to the newline. and wont parse the string.
-
If you want to use the data on another page then youm might want to store the data in a cookie or a session. That way you can use that data on the other page you are going to redirect the user to.
-
forms/variables/cookies+sessions help me please
wildteen88 replied to jwk811's topic in PHP Coding Help
Could you provide some code so can diagnose the error you are getting. You can get get form data into a another varibale like so: [code=php:0]$somevar = $_POST['your_field_name_here'];[/code] Now $somevar variable holds the value $_POST['your_field_name_here']; has. -
If you are using enum it should be this: [code]`user_level ` ENUM('0','1','2','3') NOT NULL DEFAULT '0',[/code]
-
TTF stands for True Type Font, you can get more infomation of True Tyoe Foints from wikipedia.com you can get lots of fronts from dafont.com or just search free fonts in google you're bound to find dozens of font sites.
-
cannot modify header information when logging in?
wildteen88 replied to CircularStopSign's topic in PHP Coding Help
Do you have any spaces or newlines after the closing php tags (?>) or any space before the opeing php tag (<?php). The code you posted earlier is fine, however this error is being caused by some stray output somewhere. -
cannot modify header information when logging in?
wildteen88 replied to CircularStopSign's topic in PHP Coding Help
The output has started around or on line 14 in in db.php. Whats in db.php. -
Use addslashes on the uploadfile variable: [code=php:0]$sql2="update adverts set login='" . addslashes($uploadfile) . "'";[/code]
-
This has been solved in another thread in the Apache Help forum. Umm didn't realise doox00 posted another version of the same problem in a different forum. Thread closed. doox00 if I've made a mistake please post in the PHPFreaks.com Questions, Comments, & Suggestions forum for this thread to be reopened.
-
Note when you save paths in the Paths pallete they can be reused when you control click on the path you want to use again.
-
Uploaded it [url=http://homepage.ntlworld.com/cshepwood/circles/]Clicky[/url]
-
I'll post a shoprt video in a sec, just uploading it. It should help you out Alos dont keep replying to your own posts. Use the Modify button!
-
I am not sure what you mean. Do you get any errors? If you dont then it may be a bug in your code. Also I see you have all your database credentials in a text file (includes/db_conn.txt) I strongly suggest you use php file extension rather than txt, otherwise anyone will be able to know your database login details by going to that file. Chnage it to .php and they wont be able to see it, it'll just be a blank screen.
-
i'm confused variables not taking the value
wildteen88 replied to ankycooper's topic in PHP Coding Help
I see $mfcon is coming from a your mf table in the database. What does $mfcon hold? -
Sorry I meant remove the spaces before or after EOF; or EOR;
-
Use if/elseif/else statement rather than seperate if statements.
-
Is that used for a menu on your site and when you mouse over the image it changes to something else. If so a good subsitute is CSS and not PHP. With CSS you use the :hover pesudo selector.
-
I see you are using HEREDOC syntax on large text strings. This is fine however, You cannot indent or put anythink before or after the closing HEREDOC tag. Eg you cannot do this: [code]$str = <<<EOF large text string EOF;[/code] You see EOF; that has be in the first column of the line its on, it cannot be indented or having before or after it it has to be on a new line on its own. [code]$str = <<<EOF large text string EOF;[/code] This is whats causing this error. The lines your want to change are line 57, 86, and 129