Jump to content

Recommended Posts

ok, i have been learning php over the last 8-9 months and have really took off with it. I ve been practacing all the time and belive one day i could get a job doing somthing i love. At the moment and doing a bit of freelancing and have just got my first client. He wants a website with a fully automatic login and register feuture. I have tried for about 2 das getting it to work but have had no look with it so far.

 

Its probaly just a small error but i can see whats wrong.. It could jsut be a problem with my browser.

 

<html>

<div id="login box"></div>

 

<?php

echo "My Login Page";</$>

<php>

 

<?$ <Login></Login>

<?$ <Password></Password>

<css>

Blue=login box border$>

Medium Green=Text color$>

Green=background$>

</css>

 

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/
Share on other sites

That code doesn't event represent PHP at all. What are you trying to do?

 

pfft.. i think i know what im talking about  ive been programming in php for over 9 months now..

9monts is nothing. Correct PHP syntax is like

<?php

$var = 'some value';

echo $var;

call_some_function_here();

?>

What you posted is not event close to PHP.

 

?? No, im using i think APPLE or something

What! As in Apple Mac OSX? That is not even PHP thats a computer operating system.

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/#findComment-876009
Share on other sites

<html>

<div id="login box"></div>

 

<?php

echo "My Login Page";</$>

<php>

 

<?$ <Login></Login>

<?$ <Password></Password>

<css>

Blue=login box border$>

Medium Green=Text color$>

Green=background$>

</css>

 

 

Closest I can figure...

 


<html>
<div id="login box"></div>

<?php
echo "My Login Page";
?>

<form>
Login <input type="text">
Password <input type="text">
</form

<css>
Blue=login box border$>
Medium Green=Text color$>
Green=background$>
</css>


 

:confused::wtf:

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/#findComment-876011
Share on other sites

I really cannot fathom what you're working with. and googling returns nothing on these strange </$> tags... i think you are quite mistaken on some things, good sir.

 

:intoxicated:

 


<?php
include("config.inc.php");
session_start();
if (!isset($_SESSION['user'])){
header("location: login.php");
exit();
}

//filepath
$filename = $_FILES['file']['name'];
$filename = explode(".",$filename);
$fileid = uniqid();
$fileurl = "http://" . $_SERVER['HTTP_HOST'] . "/image.php?loc=" . $fileid . $filename[0] . "." . $filename[1];
$dbfileurl = $fileid . $filename[0] . "." . $filename[1];
$filepath = getcwd() . "/imageup/" . $fileid . $filename[0] . "." . $filename[1];

//file restrictions	
if (
$_FILES['file']['type'] == "image/jpg"
|| $_FILES['file']['type'] == "image/gif"
|| $_FILES['file']['type'] == "image/jpeg"
&& $_FILES['file']['size'] < 1048576
)
{
if($_FILES['file']['error'] > 1)
	{
	exit ("<center>There has been an error uploading your file:" . $_FILES['file']['error'] . "</center><br />");
	}
	elseif (file_exists($filepath))
	{
	echo "<center>A file with this name already exists.</center>";
	}
	else
	{
	echo $dbfileurl;
	$filesize = $_FILES['file']['size']/1000;
	$filesize = number_format($filesize,0);
	move_uploaded_file($_FILES['file']['tmp_name'],$filepath);
	echo "<center>Your file has been succesfully uploaded</center><br />";
	echo "<div class=\"upload_info\" align=\"center\">";
	echo "<center>File uploaded: " . $_FILES['file']['name'] . "<br />";
	echo "File type: " . $_FILES['file']['type'] . "<br />";
	echo "File size: " . $filesize . " KB<br />";
	echo "Storage location: " . "<a href=\"$fileurl\">$fileurl</a>" . "<br />";
	echo "expiry date: ";
	echo "</div>";
	$username = $_SESSION[user][name];
	mysql_query("INSERT INTO `imageup` (url, user) VALUES ('$dbfileurl', '$username')") or die ("could not save file url in db" . mysql_error());
	}

}
else
echo "<center><b>Invalid file</b></center>";




?>

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/#findComment-876018
Share on other sites

lol....after 1 month of using PHP would give you the proper syntax for anything to show up correctly in your browser...

 

whats wrong with it??

As was said earlier it is not PHP code. That whats wrong.

 

Why you post this code?. You are not making any sense.

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/#findComment-876022
Share on other sites

I think this may help you:

 

http://net.tutsplus.com/tutorials/php/user-membership-with-php/

 

You can see how different the code looks.

 

and ya the code you posted was from: http://www.phpfreaks.com/forums/index.php?topic=260600.0 I don't see that relating to your application in mind.

Link to comment
https://forums.phpfreaks.com/topic/166105-small-php-problem/#findComment-876028
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.