Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-23-2005, 09:54 AM   #1
Young
Bland for life
 
Industry Role:
Join Date: Nov 2004
Posts: 10,468
Help with a script please.

Can anyone here take a look at a script for me? I had the script custom coded.....this might be the last time I outsource anything. Its a simple setup script to create tables in MySQL but doesn't seem to want to work.

Obviously I have changed the password, username, and database name for posting reason but I assure you that those are correctly set. The database already exists and this particular host limits me to one 10mb so that is why the setup file creates tables in an existing database.

setup.php
<?php
include 'sqlcnct.php';

// Select the database ; change the databasename with the one on your server if necessary.
$databasename = "removed";
$queryvar = mysql_select_db($databasename);


// Create news table
$maketab = "CREATE TABLE news ( title TEXT NOT NULL, content TEXT NOT NULL, added INT, expires INT, ntype TEXT, uid TEXT)";
// type is 0 if the news comes from external source, and the content is a link,
// and it is !=0 if the content is stored in the database
$queryvar = mysql_query($maketab);

// Create scroller table
$maketab = "CREATE TABLE scroller ( title TEXT NOT NULL, expires INT, uid TEXT)";
$queryvar = mysql_query($maketab);



// Create admin password table
$maketab = "CREATE TABLE admin ( usern TEXT NOT NULL, pass TEXT NOT NULL)";
$queryvar = mysql_query($maketab);

$defpass = crypt("removed",5);
$adminuser = "administrator";
// Insert the admin details
$maketab = "INSERT INTO admin VALUES('".$adminuser."','".$defpass."')";
$queryvar = mysql_query($maketab);

mysql_close($cnct);
echo "Tables successfully created! Please remember to delete this script from your server!";

?>


sqlcnct.php

<?php
$site = "removed";
$username = "removed";
$password = "removed";
$cnct=mysql_connect($site, $username, $password);

$databasename = "removed";
$queryvar = mysql_select_db($databasename);

?>


Thanks to anyone that can help me figure this out.
__________________
★★★
Young is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-23-2005, 10:20 AM   #2
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
sql queries are good

what kind of error you getting?
__________________
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-23-2005, 10:27 AM   #3
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
add in:
echo mysql_error()."<br>\n";

after each mysql_query() statement and paste the errors you are getting here...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2005, 02:41 PM   #4
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.