
zhahaman2001
Members-
Posts
46 -
Joined
-
Last visited
Never
Everything posted by zhahaman2001
-
[SOLVED] PHP 5 Undefined variable error
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
-
Well I just upgraded to PHP 5 but now no variables will pass page to page like I use to have them do and im getting error messages that say undefined variable bla bla bla. I think this is a quick fix by changeing something in php.ini. I just dont know what to change any ideas?
-
[SOLVED] no mysql commands will works at all please help
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
display_errors was off and I turned it on but it still will not display errors... -
ok i just installed apache 2.2 php 5 mysql 5 and when i write a php file and have any mysql commands the script like jumps right over them and ignores them this is really wierd because i have phpmyadmin installed and that is working fine with both php and mysql becuase i am reading and writeing data with it theres got to be a setting wrong somewhere in my server or something... anyone have any ideas? (if it matters this is how i set my server up) http://autoindex.sourceforge.net/forum/apache.php?id=0
-
ok i have a page that generates some images... problem is users keep clicking off the page before its done loading and makeing all the images... is there something i can have that will indicate when the page is done loading....like text changeing on the page or something...
-
[SOLVED] uploading files in an array HELP!!!!
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
Thanks google <?php $files_to_upload = 3; if($step == 2){ for ($i = 1; $i < ($files_to_upload + 1); ++$i) { $tmp_name = $_FILES["file"]["tmp_name"][$i]; $name = $_FILES["file"]["name"][$i]; $upload_dir = "uploads/$name"; if(move_uploaded_file($tmp_name,$upload_dir)) { print "Upload Successfull!"; }else{ print "Error and its all your fault!"; } } } print "<form method='post' enctype='multipart/form-data' name='frm' action='test.php?step=2'>"; for ($i = 1; $i < ($files_to_upload + 1); ++$i) { print "<input type='file' name='file[$i]'><br>"; } print "<input type='submit' value='Upload'>"; print "</form>"; ?> -
I can not get files to upload in and array!! how do i do it? Heres what i got can anyone get this code to work? <?php $files_to_upload = 3; if($step == 2){ for ($i = 1; $i < ($files_to_upload + 1); ++$i) { $file_name = $_FILES['file[$i]']['name']; $upload_dir = "uploads/$file_name"; if(move_uploaded_file($_FILES['file[$i]']['tmp_name'], $upload_dir)) { print "Upload Successfull!"; }else{ print "Error and its all your fault!"; } } } print "<form method='post' enctype='multipart/form-data' name='frm' action='test.php?step=2'>"; for ($i = 1; $i < ($files_to_upload + 1); ++$i) { print "<input type='file' name='file[$i]'><br>"; } print "<input type='submit' value='Upload'>"; print "</form>"; ?>
-
I got custom fonts on a server lets say its http://www.server.com/font.ttf so what html code could I use to display that? like <font face='http://www.server.com/font.ttf'>The Font Looks Like This</font> how do I get that to work?
-
2 submits useing the same inputs....?
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
i do not understand what you are trying to say.... -
2 submits useing the same inputs....?
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
i seem to keep haveing that javascript error icon in the bottom of my browser what am i doing wrong? i am puting <script language="javascript"> function popup(){ var query_str = ""; for(i=0;i<document.formname.elements.length;i++){ query_str += document.weburl.elements(i) .name+"="+document.weburl.elements(i).value query_str += "&"; } window.open("prevew.php?"+query_str,,'width=100;height=100'); } </script> in the head right? -
2 submits useing the same inputs....?
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
ill give it a shot thanks -
ok I have a page that has like 50 inputs... (to create an image) so many that I want a preview button and a submit button the submit will add the info to the database like it should but the preview button will make a pop up with a new page my problem is that i need all the info sent to both pages....if they click preview i need all the inputs send to preview.php and if the user clicks submit i need all the inputs to go to generate.php how do i do this?
-
thanks guys
-
<?php $im = imagecreate (250, 28); $black = ImageColorAllocate ($im, 0, 0, 0); $yellow = ImageColorAllocate ($im, 235, 235, 51); ImageTTFText ($im, 20, 0, 10, 20, $yellow, "/WINDOWS/Fonts/IMPACT.ttf", "IMPACT FONT HIP HIP Hurray!!!"); ImagePNG($im); ?> I got that code to work but how would I save that image to a dir like /images ?
-
ok I need to open this file http://www.myresistance.net/ustat_jake.php?pname=CLK1841 coppy all the text and then print it in my page i tried $file = implode(file("http://www.myresistance.net/ustat_jake.php?pname=CLK1841")); but that dosnt work i get this error: Warning: file(): URL file-access is disabled in the server configuration in /home/content/z/h/a/zhahaman2001/html/zhahaman2001/index.php on line 9 Warning: file(http://www.myresistance.net/ustat_jake.php?pname=CLK1841): failed to open stream: no suitable wrapper could be found in /home/content/z/h/a/zhahaman2001/html/zhahaman2001/index.php on line 9 Warning: implode(): Argument to implode must be an array. in /home/content/z/h/a/zhahaman2001/html/zhahaman2001/index.php on line 9 so anyway to fix this? Or is there another way to get that pages data?
-
hey I got it to work...... cool (sorry I have no idea what i did but its working now) ok how can i put a background to that image?
-
no output
-
ok I need to create an image, it needs to have the background of another image (bg.jpg) and then have text printed on top of it. I have tried jpgraph but it was to hard to understand then i tried this (which I found on phpfreaks) <?php header ("Content-type: image/png"); $img_handle = ImageCreate (230, 20) or die ("Cannot Create image"); $back_color = ImageColorAllocate ($img_handle, 0, 10, 10); $txt_color = ImageColorAllocate ($img_handle, 233, 114, 191); ImageString ($img_handle, 31, 5, 5, "My first Program with GD", $txt_color); ImagePng ($img_handle); ?> but it get this error: Warning: Cannot modify header information - headers already sent by (output started at /home/content/z/h/a/zhahaman2001/html/test.php:2) in /home/content/z/h/a/zhahaman2001/html/test.php on line 3 and the code I showed you is the ONLY code on that page. Any ideas how to fix this error or an example of how I could get it to work with jpgraph? thanks
-
Hey guys im beta testing my new game
zhahaman2001 replied to zhahaman2001's topic in Beta Test Your Stuff!
sorry had to move server its at www.KingdomConquerors.com now .... what do you guys think? -
I need a good system to know if users are online or not
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
but the point of this is to make it so the user cant login from two places at once... so if user "tom" logs in and waits a min then someone else can log in useing his name and there would be 2 users on the same name -
Ok I have read up on it and found a few ways to do this most of which wont work for me... the way that would mostly work is when a user logs in it changes a timestamp to the current time in the database under his/her table and if they log out it changes it to 0 (sessions time out in 15 minutes) so to find out if user is logged in is a simple if statement ex if timestamp > currenttimestamp – 15 (that’s not really it but you get the idea of how it works) the problem with this system is if the user closes the browser with out logging out and opens it back up they no longer have a session and they are logged out but the database will read that they are still logged in for the next 15 minutes because it doesn’t know the session has ended So is there a workaround so I can use this system or better yet is there a better system i can use? Thanks in advance for the help
-
I am done with the game I have been makeing and its ready for beta testing if anyone wants to check it out and give me some freedback on it that would rock its at this address www.v6.kingdomquests.com
-
combo box with data from table in database
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
any links where i can get an idea of how to do it? -
combo box with data from table in database
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
did i post this in the wrong section or......did i write it in a way that no one understands? i really need this problem solved please anyone have any ideas?? please!!!!! -
uploading an .avi to server gets an error
zhahaman2001 replied to zhahaman2001's topic in PHP Coding Help
no when i click it in windows it gets an error