-
Posts
895 -
Joined
-
Last visited
-
Days Won
1
Everything posted by phppup
-
setting SMTP in php.ini to make mail() function work
phppup replied to ajetrumpet's topic in PHP Coding Help
The link you posted does not connect to a definitive article. Please double check it. -
I have an index HTML form that has a JavaScript link and action = 'xyz.php' Everything works fine. I've seen PHP scripts with HTML form after the closing tag ?> and they work. Yet when I included my HTML g form after my PHP code, some of my JS stopped working. What are the protocols to combining PHP and HTML? Which should run first? When is the action run?
-
Thanks greatly to cyberRobot. Using the diagnostic PRINT line assured me that the UPLOAD is being grabbed and effectively moving files. Now I need to focus on the code. At this point, I think these lines are where my problem lies if($dir = opendir($startingFolder)){ while(($file = readdir($dir))!== false){ The original scripting (which works) is designed to take folders from an established folder rather than from an upload. So my thinking is that I need to initiate a transition. I have tried replacing these lines with foreach ($_FILES["upload"]["error"] as $key => $error) { $tmp_name = $_FILES["upload"]["tmp_name"][$key]; if (!$tmp_name) continue; $name = basename($_FILES["upload"]["name"][$key]); if ($error == UPLOAD_ERR_OK) { but that is apparently incorrect. What coding can I use to bridge the gap to allow the uploaded files to continue through the scripted process?
-
I am double checking my code and I have had the correct syntax in place (ie: $startingFolder = $_FILES['upload']; ) yet I am not getting a result unless a switch back to $startingFolder = 'myLocalstorage/'; (at which point everything runs fine. Is there a diagnostic or echo that I can use to confirm a connection to the uploading items. My upload is confirming that the items are selected, but I am not receiving a success message nor am I seeing a result in my destination folder when I upload.
-
In actuality the quotes are in the correct location. It's the damn software that I am trying to use to create the post that keeps shifting things. $startingFolder = $_FILE['upload']; ['justsinglequotesethere'] But I still am not getting any results. PS: should echo $startingFolder give me the name of the tmp folder or list its contents? What do I need to complete the connection? I HATE AUTOCORRECT. yez, I h@te it soooo much.
-
Thanks to all, but I am still confused. I have read both Barand's references earlier, and in fact have quotes on my array index. Am I correct in expecting $startingFolder = '$_FILE['upload']; to work as a valid replacement to $startingFolder = 'LocalFolder/' or am I missing something. Isn't the code that effectively loops through the folder's files adequate to loop through the array? Should I be linking to the tmp folder instead?
-
I have a PHP script that modifies images that are stored in a local folder related to $startingFolder. Essentially, I can use $startingFolder = 'anyFolder/'; $finalFolder = 'endResult/'; To manage the variables and direct the source and destination of the scripts actions from this starting point. I'm trying to extend my capabilities so that I can use the script while uploading images. Rather than UPLOAD several images to $startingFolder and then run the script, I thought it would be more efficient to handle this in one script. However, I am having trouble making the CONNECTION so that this can be accomplished. What is the proper way to 'grab' the files during upload? How can I access the files during the process? I have a working HTML <input type='file' name='upload[]' multiple > And have tried $startingFolder = '$_FILE[upload]'; but I am missing the mark somewhere. Please help.
-
After a lot of reading and some progress, there are now a whole new set of questions that have emerged. So this thread requires more discussion and opinion for guidance, rather than actual code solutions. I have found different approaches to uploading image files. Some upload directly to a destination folder. Some upload to a database. Some do both. It seems more practical to upload image files to a folder (although I do recognize the bonus of having information about the individual files stored for reference), but is there a benefit to using one instead of the other? For space? Speed? Other implementations?
-
That's exactly what I was trying to avoid. LoL. Thanks.
-
So a decent script would include a php file that connects to the server, and validates the file type or 'scrubs it' for security purposes?
-
Are you saying that even if the JavaScript is on the server, it will not be able to put the image files on the same server?
-
An obvious answer would be ok. Sometimes the most difficult solutions are in plain sight. I am not doing the images in a database, so I am looking at JS scripting. I want sure if the destination folder is required to be at the top of a script, or file some specific guidelines. I'm sure I'll eventually find the answer, but I was hoping for a clue that might help me save some time.
-
It always seems so simple.... LOL Hello to my old friends, I have been toying with adding an UPLOAD SCRIPT for moving images from a desktop to a website in order to eliminate the need to log into the server to post images. I've seen a few online scripts of various degrees and some with demos), yet the one blaring question remains: Where is the line that dictates where the files end up? So many of the scripts explain how wonderfully they look and operate, but they do not indicate where to edit in order to control the endpoint. Any insight, as well as guidance to avoid pitfalls with regard to this venture will be appreciated. Happy Halloween, as if coding isn't scary enough (at times). *wink*
-
Can I simply change the MP4 extension to AVI just to confirm functionality?
-
I opened the webpage in both Firefox and Chrome and got the same result. I'm going to conclude that since these are the same browsers that played the video from W3 (both while at their URL and after saving the file locally) that it is not a browser issue. How do I proceed regarding the codecs, or is their a simpler / more effective way to make a simple screen recording for use on a webpage?
-
This is a first time effort to create a video of my local pc workstation screen. Attempt #1 utilized an application provided in Windows 10 to create the MP4 file. Attempt #2 was to convert a Powerpoint 2010 presentation into an MP4 file Both seemed to go well, and produced files then when clicked independently on the desktop, will play their clip. However, when called from a local webpage "No video with supported format" is the message displayed where the working video is expected. <video width="400" controls> <source src="mov_bbb.mp4" type="video/mp4"> <source src="mov_bbb.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video> <video width="400" controls> <source src="Presentation2.mp4" type="video/mp4"> <source src="Presentation2.mp4" type="video/ogg"> Your browser does not support HTML5 video. </video> I borrowed a video clip from W3 and it seems to work fine, which leads me to believe that either I am creating a damaged file or the file is not truly MP4. The file PROPERTIES indicate it is MP4 in all instances. Where did I go wrong?
-
The code below is showing "undefined" and "OBJECT" errors What am I doing wrong to build this multi-dimensional array? And why can't I paste it to this page???????????????????????
-
I initially set up a few VAR items to learn some JS coding. Then it became apparent that altering the group and entering them into an array would be more effective. However, my limited knowledge is confusing the situation. Is there a simple comparison (with proper code and formatting) that someone can provide? Example: student in the school info desired: name, age, hair color, eye color As separate VAR listings I cannot sort by age, so I create an array, but how can I name them student 1, 2, 3 etc. (or do I not want to??).
-
Thanks for you patience. I was playing around last night and EUREKA! I think I've got it. It's been a while since I worked on my PHP but I certainly managed to get something flowing through my browser. Now the next step, setting up MySQL. I generally view stored data through a "dashboard" that offers options and an Excel-styled view. Does this option exist in WAMP? I have a suspicion that it will only be generated if I create code for it. Is there a way to view the stored data without creating code for a table? Thanks for the help.
-
There's NO icon on the taskbar, but there is one with the "USB removal" button etc. Tried opening the index page from the WWW folder, but it didn't display properly. It simply showed all the PHP coding, but did NOT translate it into functional end-product. My assumption is that something is missing, but not sure what or where.
-
Do I need to have an internet connection at that point?
-
Not everything is included. I found a thread on WAMP that guided me to 4 updates to resolve an MSVCR110.DLL error. Meanwhile, I think I finally got it loaded, but nothing occurs when I hit the WAMP desktop icon (except a message asking if I want to allow the program to make changes to my computer). What should my next steps be to validate the install and utilize the download?
-
Trying to get WAMP working. Apparently there are some Microsoft updates required. What is the difference between WAMP and XAMPP? Am I right in saying that XAMPP is more advanced? Has more user options? Thanks for the help.
-
Let me re-phrase: I want to be able to test code and forms on my laptop WITHOUT using an internet connection. No cable. No WiFi. No connectivity. Just me, the laptop, and the code. Is there a simple process so that I can I install PHP and MySQL for this purpose?
-
I got a new laptop running Windows 7 and wanted to develop some PHP coding for test purposes. I want the data I test to go into MySQL. What do I need to do and where can I get the appropriate downloads to get started with the most basic of set-ups?