rnb_cassanova
Members-
Posts
31 -
Joined
-
Last visited
Never
Everything posted by rnb_cassanova
-
Hi lads, qucik question, one command im not familar with is - $TofD = $_POST["TofD"]; can some explain? Thanks David
-
I have downloaded that open source calendar, but ill be honest, I have no clue where to start when installing it. Sorry, just quite new to this all. Any assistance would be helpful. Cheers lads, David
-
Hi Guys, I need a calendar in PHP that will allow me to mark of dates. so for example if a week is booked, i can colour code it so show this. Any ideas how I can implement this? Thanks for you help in advance, David
-
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
hi im sorry, it worked perfect my fault. thanks for all your help Ray. Solved. Cheers David -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
hi, i inserted that to recieve the error- <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-3803417-1"; urchinTracker(); </script> im a bit lost now. if you can help i would appreciate it? Cheers David -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
no cigar mate, im getting this error... http://i32.photobucket.com/albums/d36/B_318is/error-upload.jpg and on IE the link is dead. Cheers david -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
the one you sent me the - <?php $dir = "C:/wamp/www/DV8 System/uploads"; if ($handle = opendir($dir)) { /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { if($file != ".." && $file != "."){ echo '<a href="'.$dir."/".$file.'" target="_blank" border=0>'.$file.''; } } } ?> -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
it will be image files, so JPEG, BMP, GIF and PNG's i believe. any ideas? cheers david -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
sorry forgot to say, also if i 'save target as' it will not download also. Cheers david -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
fantastic, it reads from the file correctly but when i click the link, I am not given the option of saving the file but instead an error that says Firefox cannot open the file. How can i rectify this, thanks for your help lads. David -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
Hi, im currently getting the following error Warning: opendir(/Uploads) [function.opendir]: failed to open dir: No error in C:\wamp\www\DV8 System\TargetUploadsPage.php on line 3 I have changed the target directory, but am leaving something out. the file is within the root and called \uploads Cheers lads david -
Uploading complete... now for the next issue
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
i have a target folder where the users uploads defaults to but now i want to be able to see whats in that folder, but only that folder, so in essence the best way i can describe is something like this... http://esupport.epson-europe.com/ProductHome.aspx?lng=en-GB&data=dkmEK02SU002FeroarA05EEv55UIF0kgE0cfqxevtXS8ndgU003D&tc=6#7 all of the files in one place, constantly updated and the user can download. I hope im making sense, Cheers David -
hi guys, As you may have seen I have completed the upload facility, i now need to be able to retrieve them from the destination file through the system. Can anyone help with a method? Thanks David
-
uploading... very close, but not quite..
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
Dennis, That worked perfect, thanks so much for that mate. Really appreciate the help. All the best, David -
uploading... very close, but not quite..
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
Hi sorry, DV8 System/Uploads/Dave.doc Warning: move_uploaded_file(DV8 System/Uploads/Dave.doc) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\wamp\www\DV8 System\ValidatingUploadAdminForm.php on line 9 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wamp\tmp\phpE8A3.tmp' to 'DV8 System/Uploads/Dave.doc' in C:\wamp\www\DV8 System\ValidatingUploadAdminForm.php on line 9 Possible file upload attack! Here is some more debugging info:Array ( [userfile] => Array ( [name] => Dave.doc [type] => application/msword [tmp_name] => C:\wamp\tmp\phpE8A3.tmp [error] => 0 => 28160 ) ) the code is [code <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="ValidatingUploadAdminForm.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" type="file" /> <input type="submit" value="Send File" /> </form> ] and <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. $uploaddir = 'DV8 System/Uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo $uploadfile; echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> sorry its everywhere, if there is a better method of pasting this please let me know. Cheers David -
uploading... very close, but not quite..
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
I have looked at yours, your is writing to a DB, mine just uploads to a local folder, thats why im confused by the why im getting so many errors. if anyone can help i would appreciate. Cheers -
Hi lads, I am trying to create an upload script. I am using http://uk3.php.net/features.file-upload for advice; Although i am receiving errors. My code is as follows- $uploaddir = '/DV8 System/Uploads/'; // im not sure if this is where the problem is - am i putting the directory in correctly? $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo $uploadfile; echo '<pre>'; <form enctype="multipart/form-data" action="ValidatingUploadAdminForm.php" method="POST"> // also should this point to a form of to the upload directory? Cheers in advance lads David
-
changing status of a record in a DB
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
brilliant! ill give that a go in a bit, thanks mate. -
Hi Guys, I need to change the status for a record in my database - In this example its from pending to approved or declined. I don't know how to go about this so any help would be greatly appreciated. Thanks Everyone.
-
[SOLVED] passing through variables in a session??
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
ok but that reads the 'login' and not the 'Name' field, here is a pic of my Db- http://i32.photobucket.com/albums/d36/B_318is/db.jpg Do i now have to ecco the session within the page i want it to display within? Cheers lads -
[SOLVED] passing through variables in a session??
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
ok cool, thats created, now i want the records only with the 'Name' field that correlates to them when they login to be displayed. eg - If the login is 'Alex' i want only the records in the DB which under the field 'Name' display 'Alex' to be shown, and all the others by other users to be hidden. Thanks lads -
[SOLVED] passing through variables in a session??
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
my login page - <?php session_start(); $_SESSION['Name'] = $Name; ?> <script language="JavaScript" type="text/JavaScript"> form action="logincheck2.php" method="get"> <p align="center"> </p> <p align="center"> </p> <p align="center"><span class="style1">User Name_</span><br> <input name="Login" type="text"> my login check - <?php session_start(); $_SESSION['Name'] = $Name; require "connect.php"; $Login = $_GET['Login']; $Password = $_GET['Password']; $query = "select * from client where Login = '".$Login."' AND Password = '".$Password."'"; $result = mysql_query($query, $connection) or die ("unable to perform query<br>$query"); $row= mysql_fetch_array($result); if ($row != null) { $_SESSION['Login'] = $row['Password']; $_SESSION['Name'] = $row['Name']; header("Location: welcompage2.php"); exit(); } else { header("Location: login2.php"); exit(); } ?> Sorry for a lot of code lads, just thought it may give a better indication than what I can explain. Thanks again -
[SOLVED] passing through variables in a session??
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
I have put - <?php session_start(); $SESSION['Name'] = $Name; require "connect.php"; on my login pages and - <?php session_start(); $SESSION['Name']; require "connect.php"; Where i want to call it into, at current its not working, can anyone help where i am going wrong? Thanks Lads -
[SOLVED] passing through variables in a session??
rnb_cassanova replied to rnb_cassanova's topic in PHP Coding Help
ok but im still a bit lost on how to do this, do i create another -if (isset($_SESSION['Login']) == false)? but specific to the user ID? Thanks Lads. -
Hi everyone, I need to display records in a database that are only specific to the user ID that is logged in. Do i need to pass through variables in a session? Currently i have - code: <?php session_start(); require "connect.php"; if (isset($_SESSION['Login']) == false){ header("Location: Login.php"); exit(); } //$query = "select * from proposals"; $query = "SELECT * FROM proposals ORDER BY proposalID DESC"; $result = mysql_query($query, $connection) or die ("mySQL Error: ".mysql_error()); ?> Thanks guys. David