This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-30 15:55:02

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

SQL Help

(Sorry for making another topic, I can't find the old one) Okay, I have this code (I marked things that I don't want to display in *. If it isn't red it means it's part of the script.):

<link rel="stylesheet" type="text/css" href="global.css" />
<?php

$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());

mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error());

// Set up our error check and result check array
$error = array();
$results = array();

// First check if a form was submitted.
// Since this is a search we will use $_GET

$query="SELECT * FROM messages";
$result=mysql_query($query);
echo "$result";
?>

But it keeps saying "Resource id #8"?

Last edited by WindowsExplorer (2011-09-30 15:55:44)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#2 2011-09-30 16:05:59

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

hmm. I think that you should take out the link at the top. And I have never heard of he error handler trigger_error(). I would switch it to die().


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#3 2011-09-30 16:07:37

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

And also, I'm working on your site right now.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#4 2011-09-30 16:09:26

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

hmm. I think that you should take out the link at the top. And I have never heard of he error handler trigger_error(). I would switch it to die().

I did that but still not working  sad  Here's where you can see what i'm working on.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#5 2011-09-30 16:10:32

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

And also, I'm working on your site right now.

Thanks! I have a theme designed, so your okay about the style! (stupid 60 sec rule!)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#6 2011-09-30 16:17:08

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

And also, I'm working on your site right now.

Thanks! I have a theme designed, so your okay about the style! (stupid 60 sec rule!)

Okay. I don't know if you want it or not, I can't remember. Do you want the messaging system? I know that you don't want the points, but what about messages, I forgot.

yes, I hate the 60-second rule as well.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#7 2011-09-30 16:20:33

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:

And also, I'm working on your site right now.

Thanks! I have a theme designed, so your okay about the style! (stupid 60 sec rule!)

Okay. I don't know if you want it or not, I can't remember. Do you want the messaging system? I know that you don't want the points, but what about messages, I forgot.

yes, I hate the 60-second rule as well.

Well, could I have the messaging system, but only admins can send messages to users, not normal users. I don't need the style, because I designed my own really cool one! Also, on the kitcat website projects don't load or show. Could you fix that?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#8 2011-09-30 16:30:34

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


Thanks! I have a theme designed, so your okay about the style! (stupid 60 sec rule!)

Okay. I don't know if you want it or not, I can't remember. Do you want the messaging system? I know that you don't want the points, but what about messages, I forgot.

yes, I hate the 60-second rule as well.

Well, could I have the messaging system, but only admins can send messages to users, not normal users. I don't need the style, because I designed my own really cool one! Also, on the kitcat website projects don't load or show. Could you fix that?

Yup! I was using a test flash player that I made (epic fail!) but I'll use thew Scratch Viewer Java player.
BTW, I sent you the FTP info on the gopher forums. Do you have Windows Vista or Windows 7? if so, you could use Windows Explorer as an ftp manager. I sent you a message on how to do that.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#9 2011-09-30 16:31:27

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


Okay. I don't know if you want it or not, I can't remember. Do you want the messaging system? I know that you don't want the points, but what about messages, I forgot.

yes, I hate the 60-second rule as well.

Well, could I have the messaging system, but only admins can send messages to users, not normal users. I don't need the style, because I designed my own really cool one! Also, on the kitcat website projects don't load or show. Could you fix that?

Yup! I was using a test flash player that I made (epic fail!) but I'll use thew Scratch Viewer Java player.
BTW, I sent you the FTP info on the gopher forums. Do you have Windows Vista or Windows 7? if so, you could use Windows Explorer as an ftp manager. I sent you a message on how to do that.

I use windowsvista, but it's okay, I'm fine with filezilla. Thank you very much  wink


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#10 2011-09-30 16:34:50

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


Okay. I don't know if you want it or not, I can't remember. Do you want the messaging system? I know that you don't want the points, but what about messages, I forgot.

yes, I hate the 60-second rule as well.

Well, could I have the messaging system, but only admins can send messages to users, not normal users. I don't need the style, because I designed my own really cool one! Also, on the kitcat website projects don't load or show. Could you fix that?

Yup! I was using a test flash player that I made (epic fail!) but I'll use thew Scratch Viewer Java player.
BTW, I sent you the FTP info on the gopher forums. Do you have Windows Vista or Windows 7? if so, you could use Windows Explorer as an ftp manager. I sent you a message on how to do that.

Where are all the pages?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#11 2011-09-30 16:38:01

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


Well, could I have the messaging system, but only admins can send messages to users, not normal users. I don't need the style, because I designed my own really cool one! Also, on the kitcat website projects don't load or show. Could you fix that?

Yup! I was using a test flash player that I made (epic fail!) but I'll use thew Scratch Viewer Java player.
BTW, I sent you the FTP info on the gopher forums. Do you have Windows Vista or Windows 7? if so, you could use Windows Explorer as an ftp manager. I sent you a message on how to do that.

Where are all the pages?

WOULD YOU JUST BE PATIENT!
I'm doing them right now. I'm almost done.
When I upload them, all pages include the header.php for the header stuff and footer for the footer stuff ( saves typeing)


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#12 2011-09-30 16:39:29

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


Yup! I was using a test flash player that I made (epic fail!) but I'll use thew Scratch Viewer Java player.
BTW, I sent you the FTP info on the gopher forums. Do you have Windows Vista or Windows 7? if so, you could use Windows Explorer as an ftp manager. I sent you a message on how to do that.

Where are all the pages?

WOULD YOU JUST BE PATIENT!
I'm doing them right now. I'm almost done.
When I upload them, all pages include the header.php for the header stuff and footer for the footer stuff ( saves typeing)

Oh! Sorry - I thought you had already done them - My bad! I'll eat a yogart now, brb in 1 min!  wink


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#13 2011-09-30 16:47:19

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


Where are all the pages?

WOULD YOU JUST BE PATIENT!
I'm doing them right now. I'm almost done.
When I upload them, all pages include the header.php for the header stuff and footer for the footer stuff ( saves typeing)

Oh! Sorry - I thought you had already done them - My bad! I'll eat a yogart now, brb in 1 min!  wink

LOL only have two more things to do


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#14 2011-09-30 16:49:52

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


WOULD YOU JUST BE PATIENT!
I'm doing them right now. I'm almost done.
When I upload them, all pages include the header.php for the header stuff and footer for the footer stuff ( saves typeing)

Oh! Sorry - I thought you had already done them - My bad! I'll eat a yogart now, brb in 1 min!  wink

LOL only have two more things to do

Ok! Could you import the css tag:

Code:

<link rel="stylesheet" type="text/css" href="http://plaxon.comyr.com/global.css" />

into each page insted of the other css tag, or would that be to hard?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#15 2011-09-30 17:06:48

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


Oh! Sorry - I thought you had already done them - My bad! I'll eat a yogart now, brb in 1 min!  wink

LOL only have two more things to do

Ok! Could you import the css tag:

Code:

<link rel="stylesheet" type="text/css" href="http://plaxon.comyr.com/global.css" />

into each page insted of the other css tag, or would that be to hard?

no, it wouldn't. i just have to stick it in header.php (all the pages include that file, but they have to have require('header.php'); to have it)


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#16 2011-09-30 17:07:26

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


LOL only have two more things to do

Ok! Could you import the css tag:

Code:

<link rel="stylesheet" type="text/css" href="http://plaxon.comyr.com/global.css" />

into each page insted of the other css tag, or would that be to hard?

no, it wouldn't. i just have to stick it in header.php (all the pages include that file, but they have to have require('header.php'); to have it)

ok.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#17 2011-09-30 17:12:50

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


Ok! Could you import the css tag:

Code:

<link rel="stylesheet" type="text/css" href="http://plaxon.comyr.com/global.css" />

into each page insted of the other css tag, or would that be to hard?

no, it wouldn't. i just have to stick it in header.php (all the pages include that file, but they have to have require('header.php'); to have it)

ok.

I don't know if the css loaded or not, but I uploaded all the files!
http://gopherprogramming.comli.com/
You need to edit header.php though, I didn't change ANY of the style.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#18 2011-09-30 17:17:10

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

WindowsExplorer wrote:

GP1 wrote:


no, it wouldn't. i just have to stick it in header.php (all the pages include that file, but they have to have require('header.php'); to have it)

ok.

I don't know if the css loaded or not, but I uploaded all the files!
http://gopherprogramming.comli.com/
You need to edit header.php though, I didn't change ANY of the style.

Awsome! Thanks, but the registration and login isn't working  hmm


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#19 2011-10-01 01:16:30

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

GP1 wrote:

WindowsExplorer wrote:


ok.

I don't know if the css loaded or not, but I uploaded all the files!
http://gopherprogramming.comli.com/
You need to edit header.php though, I didn't change ANY of the style.

Awsome! Thanks, but the registration and login isn't working  hmm

To register, enter the COPTCHA code, then click submit, then reload that page. I'll take a look at it, just in case.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#20 2011-10-01 01:40:03

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: SQL Help

WindowsExplorer wrote:

(Sorry for making another topic, I can't find the old one) Okay, I have this code (I marked things that I don't want to display in *. If it isn't red it means it's part of the script.):

<link rel="stylesheet" type="text/css" href="global.css" />
<?php

$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());

mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error());

// Set up our error check and result check array
$error = array();
$results = array();

// First check if a form was submitted.
// Since this is a search we will use $_GET

$query="SELECT * FROM messages";
$result=mysql_query($query);
echo "$result";
?>

But it keeps saying "Resource id #8"?

Because you are seleting all mysql_query($query) returns an array


http://i.imgur.com/1QqnHxQ.png

Offline

 

#21 2011-10-01 02:39:35

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

TRocket wrote:

WindowsExplorer wrote:

(Sorry for making another topic, I can't find the old one) Okay, I have this code (I marked things that I don't want to display in *. If it isn't red it means it's part of the script.):

<link rel="stylesheet" type="text/css" href="global.css" />
<?php

$dbHost = '*'; // localhost will be used in most cases
// set these to your mysql database username and password.
$dbUser = '*';
$dbPass = '*';
$dbDatabase = '*'; // the database you put the table into.
$con = mysql_connect($dbHost, $dbUser, $dbPass) or trigger_error("Failed to connect to MySQL Server. Error: " . mysql_error());

mysql_select_db($dbDatabase) or trigger_error("Failed to connect to database. Error: " . mysql_error());

// Set up our error check and result check array
$error = array();
$results = array();

// First check if a form was submitted.
// Since this is a search we will use $_GET

$query="SELECT * FROM messages";
$result=mysql_query($query);
echo "$result";
?>

But it keeps saying "Resource id #8"?

Because you are seleting all mysql_query($query) returns an array

how do I fix it?

Last edited by WindowsExplorer (2011-10-01 02:40:08)


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#22 2011-10-01 02:57:38

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

I don't know. Anyway, do you have an IOS of some sort? If so, could you please test this GE test for me? Just drag the box. http://goeverywhere.net63.net/ios/drag/ won't work with mouse or simulator

Last edited by GP1 (2011-10-01 02:58:17)


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#23 2011-10-01 03:11:18

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

GP1 wrote:

I don't know. Anyway, do you have an IOS of some sort? If so, could you please test this GE test for me? Just drag the box. http://goeverywhere.net63.net/ios/drag/ won't work with mouse or simulator

Sorry, I don't have an iOS, but ill try with my normal touch-screen phone, ok?


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#24 2011-10-01 03:18:18

WindowsExplorer
Scratcher
Registered: 2011-02-25
Posts: 1000+

Re: SQL Help

Not working on my samsung libre anywhat.


http://i.imgur.com/H6LLdnK.pnghttp://i.imgur.com/VYuD7BY.png

Offline

 

#25 2011-10-01 03:23:29

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: SQL Help

I think it has to be an IOS.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

Board footer