PDA

View Full Version : need script idea



Colin-Roberts
10-03-2007, 02:28 PM
i feel like making something that people will use. i thought something like myspace or facebook but its an overused idea i was thinking something like habbo friends
where if you know there first / last name you can see all there fav things like colour ect would be actually use it/
?

Oni
10-03-2007, 02:30 PM
Picture sharing script. So you take pictures and share them with people to use on layouts or like projects for school or whatever.

Invent
10-03-2007, 02:36 PM
Like a stock image site?

Oni
10-03-2007, 02:45 PM
Like a stock image site?
Yeh but sharing so people can use em for bgs on pcs etc too

Invent
10-03-2007, 02:49 PM
The idea has been suggested so many times, but no-one has ever made that type of site I think.

I might make it :)

Colin-Roberts
10-03-2007, 02:51 PM
ok i think i decided now i just got to figure out the mysql tables :S
can someone post a basic mysql table?

Invent
10-03-2007, 02:53 PM
What are you making :)

Colin-Roberts
10-03-2007, 02:58 PM
a profile thing like habbo friends for now: http://www.colin.galaxy-webhosting.co.uk/v2/profile.php
you'll be able to search by first / last name and view there profile i just suck at mysql

Invent
10-03-2007, 03:00 PM
MySQL is the easiest thing ever?

Just use phpmyadmin (if your host doesnt have it, they obviously suck).

Colin-Roberts
10-03-2007, 03:13 PM
i know i suck at making the tables tho,
anyone tell me why this says form submited but it doesnt show up in phpmyadmin
profile.php and the db stuff was removed it was there.

<?php
$db_host = "localhost";
$db_user = "";
$db_pwd = " ";
$db_name = "";
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
?>
<html>
<head>
<title>Profile</title>
</head>
<body>
<?php
if (!isset($_POST['submit'])) {
?>
<form action="" method="post">
First Name: <input type="text" name="name"><br>
Last Name: <input type="text" name="lname"><br>
Age: <input type="text" name="age"><br>
Fav Color: <input type="text" name="color"><br>
Best Friend: <input type="text" name="friend"><br>
# Of Pets: <input type="text" name="pet"><br>
# Of Siblings: <input type="text" name="sib"><br>
Fav Town: <input type="text" name="ftown"><br>
Home Town: <input type="text" name="htown"><br>
Status: <input type="text" name="stat"><br>
Gender: <input type="text" name="sex"><br>
Grade: <input type="text" name="gr"><br>
<input type="submit" name="submit" value="Submit!">
</form>
<?php
} else {
$name = $_POST['name'];
$lname = $_POST['lname'];
$age = $_POST['age'];
$color = $_POST['color'];
$friend = $_POST['friend'];
$sib = $_POST['sib'];
$ftown = $_POST['ftown'];
$htown = $_POST['htown'];
$stat = $_POST['stat'];
$sex = $_POST['sex'];
$gr = $_POST['gr'];
mysql_query("INSERT INTO `profile` (name, lname, age, color, friend, sib, ftown, htown, stat, sex, gr) VALUES ('$name', '$lname', $age', '$color', $friend', '$sib', $ftown', '$htown', $stat', '$sex', $gr',)");
echo "Success! Your Profile has been added!";
}
?>
</body>
</html>


screenie of table:
http://www.uploadz.co.uk/139tables.png
http://www.uploadz.co.uk/139tables.png

Dentafrice1
10-03-2007, 03:26 PM
<?php
$db_host = "localhost";
$db_user = "";
$db_pwd = " ";
$db_name = "";
mysql_connect($db_host, $db_user, $db_pwd);
mysql_select_db($db_name);
?>
<html>
<head>
<title>Profile</title>
</head>
<body>
<?php
if (!isset($_POST['submit'])) {
?>
<form action="" method="post">
First Name: <input type="text" name="name"><br>
Last Name: <input type="text" name="lname"><br>
Age: <input type="text" name="age"><br>
Fav Color: <input type="text" name="color"><br>
Best Friend: <input type="text" name="friend"><br>
# Of Pets: <input type="text" name="pet"><br>
# Of Siblings: <input type="text" name="sib"><br>
Fav Town: <input type="text" name="ftown"><br>
Home Town: <input type="text" name="htown"><br>
Status: <input type="text" name="stat"><br>
Gender: <input type="text" name="sex"><br>
Grade: <input type="text" name="gr"><br>
<input type="submit" name="submit" value="Submit!">
</form>
<?php
} else {
$name = $_POST['name'];
$lname = $_POST['lname'];
$age = $_POST['age'];
$color = $_POST['color'];
$friend = $_POST['friend'];
$sib = $_POST['sib'];
$ftown = $_POST['ftown'];
$htown = $_POST['htown'];
$stat = $_POST['stat'];
$sex = $_POST['sex'];
$gr = $_POST['gr'];
mysql_query("INSERT INTO `profile` (name, lname, age, color, friend, sib, ftown, htown, stat, sex, gr) VALUES ('$name', '$lname', '$age', '$color', '$friend', '$sib', '$ftown', '$htown', '$stat', '$sex', '$gr',)");
echo "Success! Your Profile has been added!";
}
?>
</body>
</html>

Colin-Roberts
10-03-2007, 03:29 PM
nope :s

Colin-Roberts
10-03-2007, 03:50 PM
new form handler still doesnt work:
its only using 1 field the name one but if i can get name to work i can transfer it to the rest.

<?
$connection=mysql_connect("localhost","colinga_profile", "profile") or die("Unable to connect!"); /* change this! */

mysql_select_db("colinga_profile") or die("Unable to select database!"); /* change this! */

$query="INSERT INTO profile (
name)
VALUES(
'".$name."')";

$result=mysql_query($query) or die("Error in query:".mysql_error());
//if ($result)
//echo mysql_affected_rows()." row inserted into the database effectively.";


mysql_close($connection);
?>

Want to hide these adverts? Register an account for free!