-
Posts
32 -
Joined
-
Last visited
Never
Posts posted by Akira
-
-
well, first of all, the include("db.php"); should be
[code]include('db.php'); [/code]
and your SQL satement is incorrect, just do it like this, easier:
[code]$sql = mysql_query("INSERT INTO band SET username='$username', password='$db_password'");[/code]
and add rest of the fields and values :)
try it again with these changes
and for the Email.
remember that gives "enters" in de code will not give "enters" in parsed html. Always use <br> or <P>
[code]Thank you for registering at our website, http://www.thebandcentral.com!<br><br>
Username: $username<br>
Password: $random_password<br>[/code]
and so on
-
[!--quoteo(post=362176:date=Apr 6 2006, 12:56 PM:name=stefpretty)--][div class=\'quotetop\']QUOTE(stefpretty @ Apr 6 2006, 12:56 PM) [snapback]362176[/snapback][/div][div class=\'quotemain\'][!--quotec--]
cheers ye i knew u cud put html in but i wanna make snipits of html files and give them names like header etc can i just unclude them where appropriate and use css to give backgrounds to where the php prints?
ALSO
i have a problem with my php scripts......
i get this message when i try to register.... silly thing is there is nothing on line 4 in registerun.php
[/quote]
you can include php files ( with your html in it ) at a location which you decide with the function:
include(); .. so like include('include/info.php');
in the main file you can include your CSS will will style all other included php files.
for the SQL, can you post it? probally your missing a } somewhere or your not ending your SQL the rigjt way.. SQL="SELECT * FROM lol";
[!--quoteo(post=362178:date=Apr 6 2006, 01:09 PM:name=stefpretty)--][div class=\'quotetop\']QUOTE(stefpretty @ Apr 6 2006, 01:09 PM) [snapback]362178[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Another issue i just discovered is this when i try to login.....
the thing is on line 47 i have
[/quote]
also seems you didn;t close a loop or variable good.
$test; alsways end with ; -
[!--quoteo(post=362048:date=Apr 5 2006, 11:17 PM:name=stefpretty)--][div class=\'quotetop\']QUOTE(stefpretty @ Apr 5 2006, 11:17 PM) [snapback]362048[/snapback][/div][div class=\'quotemain\'][!--quotec--]
well im a newbie lol btw how do u intergrate ure html and php together and use a html template and the php script just prints content onto main section and keeps rest same?
[/quote]
you can use html in .php files if thats what your asking. And the middle section in php can be genarated from a database to keep the content dynamic...
maybe you should buy a book for the basics of php? or do some online tutorials -
To save server time, always try to cache the images.
What i do, is when i upload an image, it resizes and stores the image on the server directly.
The standaard PHP function move_uploaded_file(); will do the trick.
For examples on how tu use, please visit [a href=\"http://nl3.php.net/move_uploaded_file\" target=\"_blank\"]http://nl3.php.net/move_uploaded_file[/a] -
[!--quoteo(post=361896:date=Apr 5 2006, 11:59 AM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Apr 5 2006, 11:59 AM) [snapback]361896[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if the seperate file is purely responsible for drawing/outputting the image, then you need to include the file using <img> tags (like a normal picture) and NOT via an 'include' statement. if you do the latter, the headers won't be sent properly/at all as you'll have already displayed content on your page.
hope that helps
[/quote]
mm stupid me :) i was alrdy trying it with the image tag, but didn;t imagine that you could inlcude a image like <img src='include/image.php'>, so with the .php extension :)
Thnx heaps!
-
I have some code ( see under the code output) which I put in a seperate file, now i want to include the generated image on my main page. But somehow when i include the file, it gives only the pure text image instead of the jpg image :| First i thought it might be the Header("Content-Type: image/jpeg"); , but that wasn;t the problem.
So how can i include this image in a normal way ? please advise
I have some code ( see under ) which I put in a seperate file, now i want to include the generated image on my main page. But somehow when i include the file, it gives only the pure text image instead of the jpg image :| First i thought it might be the Header("Content-Type: image/jpeg"); , but that wasn;t the problem.
So how can i include this image in a normal way ? please adive
[code]
Imagejpeg($finalimage);
Imagedestroy($finalimage);
Imagedestroy($thermImage);
Imagedestroy($thermbarImage);
[/code]
NEED hellp this is a private convo!
in PHP Coding Help
Posted
[code]if (!$_SESSION['username']) {
if ($error) {
echo $error;
include("login.html");
} else {
echo "<html><head><title>Welcome Back</title></head><body>Welcome back ".$_SESSION['name']." <a href=\"settings.php\">Click here</a> to view your current settings.</body></html>";
}[/code]
in this code, your second IF statement hasn;t got a closing bracket
[code]if (!$_SESSION['username']) {
if ($error) {
echo $error;
include("login.html");
}
} else {
echo "<html><head><title>Welcome Back</title></head><body>Welcome back ".$_SESSION['name']." <a href=\"settings.php\">Click here</a> to view your current settings.</body></html>";
}[/code]