NME
-
Posts
22 -
Joined
-
Last visited
Never
Posts posted by NME
-
-
stack[1]=new Array(2);
stack[2]=new Array(2);
stack[1,1]="hello";
stack[2,1]="world";
document.write(stack[1,1] + " " + stack[2,1]);
quick question.. why does the above write out the following:
"world world";
i need it to write out:
"hello world";
any ideas. thanks.
-
ok i figured that might be a problem.
so i put this in:
ini_set("upload_max_filesize", "8M");
does that seem alright? i just want to increase the max_filesize to 8MB from 2 MB standard.
-
haha crap i dont think thats what i meant. my problem is that i added a php.ini file to my server, but now when i do phpinfo(); it still shows information from the default php.ini that my webhost uses.
-
ok i kinda get what ur talking about. when i make this element.php i should basically put in something like include ' php.ini'; ? or something else. sorry i just dont understand how to literally link the php.ini page.
-
simple question. i made a php.ini, how do i get all my pages to link to it? do i just put it in the root folder of the server?
-
any suggestions would be really appreciated.
-
hey guys, thanks for all the help so far.
but the problem is still there. here is the updated code:
<html>
<body>
<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="uploadtest_script.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" id="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</body>
</html>
and its script:
<?
ini_set("memory_limit", "32M");
ini_set("max_execution_time", 0);
error_reporting(E_ALL & ~E_NOTICE);
print "size:". $_FILES['userfile']['size'] . " ";
print "name:". $_FILES['userfile']['name'] . " ";
print "type:". $_FILES['userfile']['type'] . " ";
print "tempname:" . $_FILES['userfile']['tmp_name'] . "";
?>
and its result:
size:0 name:2.mp3 type: tempname:
-
in my php.ini i set the post_max_size to 8M. is there something else that needs to change? the mp3 i uploaded was 3.7M
-
Hey guys, im trying to upload mp3's onto my site. i know how to do it with images but I'm getting some problems when i select an mp3 file. I cut the problem down to the following and made it very easy to read:
<html>
<body>
<form action="uploadtest_script.php" method="post" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
and the script is here. its a simple print out of all the FILES variables:
<?
print "name:". $_FILES['file']['name'] . " ";
print "type:". $_FILES['file']['type'] . " ";
print "size:". $_FILES['file']['size'] . " ";
print "tempname:" . $_FILES['file']['tmp_name'] . "";
?>
and these are the results im getting???:
size:0 name:2.mp3 type: tempname:
Basically, the variables are not being set to the FILES array. any suggestions? thanks.
-
Thanks a ton man. Your awesome
-
Hey guys, I was just wondering if there was any command to jump to a different page without clicking a hyperlink.
An example is suppose the user clicks a link that leads to a file where there are a few mysql commands, and then i want to go back to the initial page immediately after those commands are completed. I already know about include, but for some reason its not working when i do something like...
include 'www.blah.com/blah.php?blah=$blahid'.
-
any help would be really appreciate guys
-
hmm im still getting an error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''Info_User_19' ( 'index' INT( 25 ) NOT NULL AUTO_INCREMENT ,
by the way, thanks so much for all your time poirot. -
Ok, this is what is says, but i still cant figure it out:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'int(25) NOT NULL auto_increment, freinds int(25) NOT NULL, -
Thanks, but it stil doesnt create me a table.
-
I am trying to dynamically create a table with a different name everytime. The following code is used, but it never seems to actually create a Table when i look at the database.
[code]$dbhost = '<myhost>';
$dbusername = '<myusername>';
$dbpasswd = '<mypassword>';
$database_name = '<mydatabasename>';
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd")
or die ("Couldn't connect to server.");
$db = mysql_select_db("$database_name", $connection)
or die("Couldn't select database.");
$sql = mysql_query ( "CREATE TABLE user_" . $userid . " (
index int(25) NOT NULL auto_increment,
count int(25) NOT NULL,
PRIMARY KEY (index)
)");
[/code]
Any ideas why nothing is happening? -
ah ofcourse, im an idiot. thanks so much.
should've been SELECT * FROM ... -
This is my code:
[code]$query= "SELECT userid, first_name FROM users2 WHERE username='$username' AND password='$password'";
$result = @mysql_query($query);
$row = mysql_fetch_array($result, MYSQL_NUM); //returns the row with that users information in the users2 table.
if($row)
{
$_SESSION['userid']=$row[0];
$_SESSION['first_name']=$row[1];
$_SESSION['last_name']=$row[2];[/code]
for some reason $row[2] returns nothing (meaning $_SESSION['last_name'] is nothing as well), although $row[1] and $row[0] return the values they intend from my SQL table. why won't row[3] or any subsequent rows show?
thanks.
-
Ok i got the solution, thanks for the help guys
turns out it was a session problem:
session_register('list1');
$_SESSION['list1']=$list1;
i commented out the $_SESSION line... i didnt think i needed it, guess i do. thanks -
[!--quoteo(post=375327:date=May 19 2006, 04:09 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 19 2006, 04:09 PM) [snapback]375327[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]
$sql3 = mysql_query("INSERT INTO '$list1' (user_id, fullname) VALUES ('$userid', '$name')") or die (mysql_error());
[/code]
try putting quotes around $list1
[/quote]
I already tried that. I get this error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''' (user_id, fullname) VALUES ('1121', 'Jeff Gordon')'
thanks tho -
My code looks like this :
[code]$sql3 = mysql_query("INSERT INTO $list1 (user_id, fullname) VALUES ('$userid', '$name')") or die (mysql_error());[/code]
However, it does not work and I get the following error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(user_id, fullname) VALUES ('1121', 'Jeff Gordon')'
can anyone tell me what I'm doing wrong. Any help would be greatly appreciated. Thanks
[SOLVED] 2d array problems
in Javascript Help
Posted
? what do u mean? am i making 2d arrays incorrectly?
im under the impression that to make 2d arrays in javascript, one must do the following: (ie for a 2x2 array).
var stack = new Array(2);
stack[1] = new Array(2);
stack[2] = new Array(2);
stack[1,1]="hello";
stack[2,1]="world";
document.write(stack[1,1] + " " + stack[2,1]);