
onlyican
Members-
Posts
921 -
Joined
-
Last visited
Everything posted by onlyican
-
for this, it is best to use mktime() and time() http://uk2.php.net/function.mktime http://uk2.php.net/manual/en/function.time.php
-
new is when declaring a class in php You dont need new in php for array $this -> Cart = array();
-
Why does this code not upload picture/file to folder?
onlyican replied to JJohnsenDK's topic in PHP Coding Help
its saying that the $_FILES["pl_pic"] does not exist check that on the form, the field name is pl_pic <input type='file' name='pl_pic' /> -
the cookies aint going to work, as you can not modify the headers, which the error message was trying Try adding this at the top of your script (Line 1) <?php ob_start(); ?>
-
Start with the main query CREATE TABLE `workorder` ( `printer_make` varchar(20) NOT NULL default '', `product_num` varchar(40) NOT NULL default '', `location` varchar(50) NOT NULL default '', `serial_number` varchar(50) NOT NULL default '', `work_order_num` tinyint(4) NOT NULL auto_increment, `date` date NOT NULL default '0000-00-00', `time_in` time NOT NULL default '00:00:00', `time_out` time NOT NULL default '00:00:00', `total_time` time NOT NULL default '00:00:00', `reported_problem` text NOT NULL, `resolution` text NOT NULL, `pt_description` text NOT NULL, `pt_number` varchar(50) NOT NULL default '', `pt_qty` varchar(3) NOT NULL default '', `milage` varchar(4) NOT NULL default '', `cost_parts` varchar(10) NOT NULL default '', `cost_work` varchar(10) NOT NULL default '', `total` varchar(10) NOT NULL default '', `problem_sum` text NOT NULL, PRIMARY KEY (`work_order_num`) You need to close the query CREATE TABLE `workorder` ( `printer_make` varchar(20) NOT NULL default '', `product_num` varchar(40) NOT NULL default '', `location` varchar(50) NOT NULL default '', `serial_number` varchar(50) NOT NULL default '', `work_order_num` tinyint(4) NOT NULL auto_increment, `date` date NOT NULL default '0000-00-00', `time_in` time NOT NULL default '00:00:00', `time_out` time NOT NULL default '00:00:00', `total_time` time NOT NULL default '00:00:00', `reported_problem` text NOT NULL, `resolution` text NOT NULL, `pt_description` text NOT NULL, `pt_number` varchar(50) NOT NULL default '', `pt_qty` varchar(3) NOT NULL default '', `milage` varchar(4) NOT NULL default '', `cost_parts` varchar(10) NOT NULL default '', `cost_work` varchar(10) NOT NULL default '', `total` varchar(10) NOT NULL default '', `problem_sum` text NOT NULL, PRIMARY KEY (`work_order_num`) );
-
Why does this code not upload picture/file to folder?
onlyican replied to JJohnsenDK's topic in PHP Coding Help
show me line 65 - 70 -
Why does this code not upload picture/file to folder?
onlyican replied to JJohnsenDK's topic in PHP Coding Help
ignore the underfined index, Simply means you have a variable in a condition that is not named For Example if($_POST["myname"]){ if there is no POST values then that is a underfined index. This may stop the script if one of them vars is something your script is using Change this line move_uploaded_file($tempfile, $destination); to if(move_uploaded_file($tempfile, $destination)){ echo "File has been uploaded<br />\n"; }else{ echo "There has been an erorr uploading the file.<br />\n"; } -
Why does this code not upload picture/file to folder?
onlyican replied to JJohnsenDK's topic in PHP Coding Help
at the top of the script add this line error_reporting(2047); this will show all errors -
if the window is closed, the session will be destroyed automaticly Many people have been asking about tracking when someone closes a window, for member areas, to log people out, But as far as I know, it can not be done
-
Why does this code not upload picture/file to folder?
onlyican replied to JJohnsenDK's topic in PHP Coding Help
$destination = "../../../ That could be why Try setting up a directory starting from root $destination = $_SERVER['DOCUMENT_ROOT']."/billeder/news/".$FILES['filnavn']['name']; -
to destroy the session you can use session_destroy() (that destroys all sessions) or set the Session value to null $_SESSION["mysession"] = ""; and by closing the window, the session is normally killded off anyway
-
I have also read today that MD5 uses RSA Data Security, Inc. MD5 Message-Digest Algorithm,
-
Hey guys I am working on a script and the old script uses sha1() when creating a user to encrypt the password for the database I personally use md5() Which one is best and why?
-
thats what I was thinking I know pspell works with basic english word, and words like "paralysed" which is still an English Word But what about something like "Duchenne Muscular Disorder"; The Duchenne word is gonna be fun I have just noticed the functions pspell_add_to_personal(); pspell_save_wordlist();
-
Hey guys I have a site for disabled people, a find a friend system On the Register form I ask for there Disability (Helps to match people) During this, I have seen like 10 different spellings for one disability What I want is something like google has, If you mis-spell a word, google comes up with "Did you mean ..." How would I do this?
-
Paste the error code here as well
-
just remember the code tags, and add the snippit here, please dont post the whole page
-
The code acts as if its in a folder so as you are not in the root, it tries to find the images in the folder Best way round this is add a slash at the begining of img src instead of <img src='images/myimage.jpg' /> USE <img src=/images/myimage.jpg' />
-
You are using the POST method So you need to call the POST value which in this case would be echo $_POST["keyword"]; OR $keyword = $_POST["keyword"]; echo $keyword; I would suggest this [code] <?php $keyword = isset($_POST["keyword"]) ? $_POST["keyword"] : ""; echo $keyword; ?> [/code] The line $keyword = isset($_POST["keyword"]) ? $_POST["keyword"] : ""; Is the same as saying if(isset($_POST["keyword"]){ $keyword = $_POST["keyword"]; }else{ $keyword = ""; } A good start for php is www.w3schools.com/php
-
Hey guys This is Apache Settings Someone mentioned to me about the mod_log_config for the apache settings http://httpd.apache.org/docs/2.0/mod/mod_log_config.html I am on Shared hosting, so I dont have access to the httpd.conf file (Main Apache config) So can I add the code [code] LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog logs/access_log common [/code] to the htaccess file
-
yes, thats cos you are not calling the results [code] <?php $conn = mysql_connect("localhost", "x", "xx"); mysql_select_db("evaluation", $conn); $request = "SELECT EvaluatorName FROM yellowcard WHERE UserName = '$userName' AND CardNumber = '$cardNumber'"; $evalUser = mysql_query($request, $conn); while($row = mysql_fetch_assoc($evalUser){ echo $row["fieldname"]."<br />\n"; } ?> [/code] Where fieldname is the name of the field in myself
-
either put the header tags BEFORE HTM code is called OR Use Javascript OR add ob_start before at the top of the page, and then you can call header anywhere
-
I would do something like if(!$_SESSION["onsite"]){ //run your code to add to the site stats $_SESSION["onsite"] = true; }
-
Try this hombre [code] <?php $query = $connector->query("SELECT user,pass FROM members WHERE user = '".$user."'"); if(mysql_num_rows($query) != 0){ while($row = $connector->fetchArray($query)){ echo $row["user"]."<br />\n"; } }else{ echo "There are no results in the DB"; } ?> [/code]
-
ok, this is kinda hard not seeing the full code from the class but You normally get Resorce 5 by echoing the query Which I can see your doing there You want a while loop for the $row while($row = $connector-:fetchArray($query){ $fieldname = $row["DBFIeldName"]; }