Script Isnt Pulling The Basename From Upload
This upload script im using for some reason wont pull the file name and database it when you go to upload a file and it wont upload the file either... I used this script before and got it to work but for some reason it wont work now.. I checked the other forms and they still work so i must be missing something in the script. Code:
View Complete Forum Thread with Replies
Related Forum Messages:
Simple Image Upload Isnt Working?
im working on a simple image upload script (my first try) well i noticed that for some reason its not even recognizing a file being uploaded...ive tried using the phpfreaks simple image upload tutorial but that wont seem to work for me. Code:
View Replies !
Basename ()
there a way i can use this to get the SUFFIX of the file, not the prefix? example files: j.1 j.2 j.3 i would like to return 1 2 3 not j j j
View Replies !
Basename() Returns Blank?
We are on PHP 5.0.2 LINUX system. Since an hour ago, the function basename() started resulting inconsistent values. [snippet] print ( "dirname - " . dirname ( __FILE__ ) . "<br> " ); print ( "basename - " . basename ( __FILE__ ) . "<br> " ); [/snippet] The 'dirname()' returns proper results everytime. However, 'basename()' sometimes returns the proper result, and sometimes nothing. This started happening since this morning. Till then everything was working fine. What could ever be the problem?
View Replies !
Why Mysql Isnt Connecting
trying to get php to connect with mysql so that I can start querying db(running locally on my machine and php works fine) however I'm having trouble. This is the error it spits out- Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using password: NO) in D:phpwebconnect.php on line 5 Unable to connect to MySQL Could anyone assist me on this matter.
View Replies !
Isnt ^ Common Regex Notation?
isnt ^ common regex notation? keep getting this error: Parse error: syntax error, unexpected '^' Code: $goalsheet.=preg_replace("/^[0-9]+ Year Career Goal #[0-9]+: *$", "/^<span class=hd2>[0-9]+ Year Career Goal #[0-9]+: *</span><br>$/", $goallist); aside from the error, i think the regex is off, but i hav had a hard time finding a tutorial that explains how I can ignore text in the middle. Here are some examples of what i'm trying to do: "1 Year Goal #1: Web Developer" -> "<span>1 Year Goal #1: Web Developer</span><br>" "10 Year Goal #2: IT Consultant" -> "<span>10 Year Goal #2: IT Consultant</span><br>" suggestions?
View Replies !
INSERT Code Isnt Working.
This probably has a really simple answer, but my INSERT code isnt working. mysql_query('INSERT INTO `members` (`id`, `uname`, `uemail`, `upass`, `GUID`, `data`, `permissions`) VALUES ('NULL', $psuser, $psemail, $psPassword, 'NULL', 'NULL', Ƈ')'); And I get an error saying unexpected T_STRING .
View Replies !
How Do Sessions Work Cos Mine Isnt Working?
How do sessions work cos mine isnt working i got this: on a different page i have : $_SESSION['referer'] = '1'; then: if ($_SESSION['referer'] == '1'){ include ("include.php"); } but when i echo session it is blank =/ what did i do wrong.. i got many other sessions on the go so it should work..
View Replies !
INSERT Short Record = Fine, Long One Isnt
I have a mysql database table that I created by copying another one in phpadmin. The first table works fine. the second table works fine when I insert a short record, but when I do a long one it doesn't appear in the database. any idea what I'm doing wrong? It's not that its truncating the record, there is nothing there.
View Replies !
Security Code Image In PHPNuke Login Isnt Displaying
i installed the PHP Nuke in a remote web space bought from prackhost.Problem is that iam not able to get the security code to login to the site as admin or normal user. All the remaining images like links and logo are comming except that security code. Iam not able to do any furthur action.
View Replies !
Pulling Images
I'm having trouble getting to resize. The script works, but I get an error that says it's unable to open files for reading. Do I need to change modes or something. When I put the image files in the root directory they work fine, but when I put them in my image folder and then write the script to find them there it can't. Any ideas?
View Replies !
Pulling From A Db At Random??
I am trying to pull articles from my db at random on my site. Like for instance for a certain month I will have 20 articles in the db, and would like to pull 3 randm links to the articles at random, so everytime a user loads my hoome page different content will be provided, so it seems fresh. Any thoughts?
View Replies !
Pulling Info
Here is what I I am trying to do. select * from table where fname='fname' order by 'time_sent' desc <-- This works what I am trying to do is: select * from table where fname='fname' and opened='y' and opened='n' and opened='r' order by 'time_sent' desc <-- This doesn't work :( the entries in opened are y, n, r, a I only want it to pull y,n,r and list them where fname='$fname' only I tried googling for a solution with very little luck. Anybody have any ideas how I can accomplish this?
View Replies !
Pulling Certain Data From Db
What i am trying to do is on the view song page on my web site it will display song information. Well on the right of the info i am giong to have more songs by this artist and list about 5 or 6 songs. i have tried many different ways and i cant get it to work. so here is the code i am using $otherProds = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE ".$glob['dbprefix']."CubeCart_inventory.customer_id=productId AND deleted = 0 ORDER BY popularity DESC"); heres an image explaining what i need to do. but cannot
View Replies !
Pulling First Word
i want to be able to just pull the first part of the person's email address from mydatadase to appear on the page how would i got about doin this?
View Replies !
MySQL... Not Pulling?
I have a few different queries that pull from a very large database in mySQL. It was working fine for the longest time then one day it stopped working. It only pulls like 1 query per request and will not randomize anything. I have tried having it just list the database in PHP but that only pulls out a few things also. I have tried putting backup copies of the database up, that doesn't work either. Has anyone had this problem? I'm sorry its not very detailed, very hard to explain. Code:
View Replies !
Pulling From Three Tables
To display a list of challenges I need to access the data in: ladder_challenges -- challenge_id -- ladder_id -- datetime -- clan_id_a (user's clan) -- clan_id_b (opponent clan) clans -- clan_id (linked to clan_id_b) -- name ladder_config -- ladder_id (linked to challenges ladder_id) -- name The WHERE would be: clan_id_a = $myclanid Basically, I need to produce a HTML table with the following headers: Challenge Info (w link contains challenge_id) || Ladder Name (w link contains ladder_id) Date & Time || Clan Name (w contains link clan id). If you guys can come up with the SQL query I can come up with the table. I've only ever done a join using two tables, not three so I'm not sure where to start.
View Replies !
Pulling Text
i got this text in a colum that has some some HTML tags on it but when i load the text into my page the code doesnt execute, actually it doesnt even show up at all it just gets masked . is there a PHP function or trick that will take this mysql text with html tags and actually use those tags.
View Replies !
Pulling Information
what I am trying to do is pull information from the Generated source code of this site: http://armory.worldofwarcraft.com/#character-sheet.xml?r=Gul%27dan&n=Palaran what I want to do with it is then manipulate it withing my own code to show certain elements which were pulled from the source of the previous site. I am somewhat experienced with php and would like to use it for the development. I am sorry if I didn't explain my issue well enough, just let me know. Oh and if I am just asking a question already answered, please just let me know how to find it, I tried searching for the answer but couldn't find it.
View Replies !
Pulling Variables
I've run into a problem that I know I will encounter again and I'm not sure how this is to be done. I am a novice coder and am able to validate a form and write simple if else statements using variables, etc. However, I am now building something using an API interface. Â A GET method is required when sending the data to the 3rd party, and they in turn send back either txt, html or a xml response. Â My question is how do I read that response on the back end and then continue on in my site. Â For example, to check a domain names availability, one would enter the desired domain name and hit submit. I can build that form no problem. Â But where does the next page go? Since it is a get method I obviously need to hide my values so I assume I would use a POST to go to a "check" page, capture those variables the 3rd party requires and then send them from the "check" page, which I do not know how to do. Then a response will come back (to where I'm not sure). Â I then need to check that reponse (I'm assuming on the same "check" page somehow) and then issue some kind of resopnse to my user saying either "true" or "false".
View Replies !
Pulling The Domain From A Url
I have a table called survey an in it is a field called URL. I am trying to display on a page just the domain from the URL that is in that field. so http://www.example.com/index.php would equal either www.example.com or example.com (either would be fine, I am not picky) SO far none of my attempts have come close to working, so I am not sure how a I should go about doing this. Any suggestions?
View Replies !
Pulling Posts
I have no experience with PHP. However, I would like to set up my webpage (for a guild in an online game) to parse our "News" forum on our message board, and display the post in the main content portion of our webpage. Basically I am looking to have the webpage updated whenever I create a new post in our "News" forum, without editing the actual webpage.
View Replies !
Pulling One Item
I have a MySQL database with info stored in it (speakers at a weekly seminar). I want to display the seminar's speaker info on my webpage every week. I need it to roll over to the next week's speaker every Thursday at 1:00. I have no clue about where to even get started with this. any ideas?
View Replies !
Pulling ID From MySQL
I have a multi-page (multi-form) survey and want to make sure that each form can be connected to the others via some sort of ID. The login page asks for first, last name, username, newpassword, confirmed password, with the login form being processed by the following script: <?php $username= "myusername"; $password="mypw"; $database = "mydb"; $host = "myhost.edu"; $fname=$_POST['fname']; $lname=$_POST['lname']; $usename=$_POST['usename']; $userpw=$_POST['userpw']; $confpw=$_POST['confpw']; ..................
View Replies !
Pulling A File
I am writing a script to use ftp to download a file, then I need to unzip it and move a file to another location, I have been playing with the zip function, I can open a file in .zip but how do I actually pull the file out to move it to a different location, would I open it, then save it to the new location?
View Replies !
Rss Feed Pulling
just below the date up were it says show unread replies to new posts on that bar but to the right over above the search bar have it display daily live news.
View Replies !
Dynamically Pulling
Alright I'm not a guru at php but I have a decent grasp on the capabilities of it. I want to be able to have a text only site to go along with my website. Is there any way to gather certain areas of text from my main site and display them in the text-only site. My website is growing so big that making updates to both of the sites has become very tedious and time consuming.
View Replies !
Pulling An Array
I'm making a table called "tournament_config". It will have the following: fid = int(11) auto_inc, primary key clanh = int(11) clana = int(11) map = varchar (225) timestamp = int(11) I want to make a list of maps. E.g. map1, map2, map3, map4. That I can pull from the database and split up. E.g. In week one clans will play map1, in week two clans can play map3.
View Replies !
Query Not Pulling First Record
The script below is supposed to pull ALL the information from a mySQL dbase by date. The problem is that it always leaves out the first record. I can't see where the problem is. Please take a look and see if you can find what I can't. Thanks.
View Replies !
Pulling Title Tag Out Of HTML
Is there a simple piece of php code(s) that can pull the title of a web page out? We need to pull the words in between <title></titleand insert it into stumble upon. Here is what their requirements are:
View Replies !
Pulling Only 1 Record From A Database
$query = "SELECT widget_type FROM $database WHERE widget_type = 'A'"; $result = mysql_query( $query ); $row = mysql_fetch_array( $result ); if( $row[ 'widget_type' ] == '' ) { $has_widget_type = false; } else { $has_widget_type = true; } Lets say I have 300 parts that have widget_type A, will the query find the first one and then just stop or will it continue to search the whole database until it finds all widgets with widget_type A? If it is searching the whole database, is there a way to make it stop as soon as it finds the first instance of widget_type A?
View Replies !
Pulling A Variable From A Function
Can you pull a variable from one function to another. more specific using a switch case 1 pulls a variable out when displaying a page.ok on this page a link calls the same page but using case 2 this time. I know that the switch goes through all cases before executing, but is there a way to hold a value so it can be used in the next case.
View Replies !
Oracle/PHP - Pulling Data
How do I pull data into an array for use on my web pages? What's the best way w/ Oracle 9i? Must I bind varibables?? I'm lost... Example: $stmt = OCIParse($conn, "select * from inventory"); OCIExecute($stmt); OCIFetchInto ($stmt, $row, OCI_ASSOC); while (list($key, $val) = each($row)) { print $key . " = " . $val . "<br>"; }
View Replies !
Pulling Data From A Textfile
I have text file with three variables on each line, seperated by pipes. I read the file into an array, now I can't seem to figure out how to get each variable back out.
View Replies !
Pulling A Synopsis From Text
I am trying to automatically pull a beginning section from submitted text and return it with a More.. link. The submitted text is in html created by FckEditor (http://www.fckeditor.net/). The trouble I am running into is the cutoff point is often inside of a tag - ie after an opening <div> but the closing div is cut. The only idea I have come up with is to build an array of all possible html tags and search for a close for each but I am hoping there is a cleaner method. Has anyone attempted such a feat previously? function getSynop($input="", $more_link="", $synop_size=ôq') { $tmp_str = substr($input, 0, $synop_size); $end_val = strrpos($tmp_str, ">") + 1; if($end_val < ($synop_size)) { $end_val = strrpos($tmp_str, ".") + 1; } if($end_val < ($synop_size)) { $end_val = strrpos($tmp_str, ">") + 1; } Return substr($input, 0, $end_val) ." <a href='$more_link'>more...</a>"; }
View Replies !
Pulling Stats From Webserver
i got this webserver that has all my stats for the server running on it. It tells me how many people are in my multiplayer and thier names. I want to pull this information which is laready in a neat little table onto my website. I tried php include(); but it didnt work at pulling the website information over. So is there a way to pull an entire page from a server that I own onto my website?
View Replies !
Pulling In One Item Of Four Categories
Ive got an offers table which contains name, category_id I want to display all offers, however the first page will only display four offers (one of each category). My query is as follows so how do I do this part? Code:
View Replies !
Pulling Database Value In To Array
How do I pull information from one of the fields in my database and put this into an array. The information in the field is stored as follows with a comma between each number 1342,1873 I need to get these numbers in to the array, then after this I can pass each value and check this against another table in my database. I tried $arr=array($row['numbers']); and of course it did not work. I need it so when pulled from the database it formats like below $arr=array("1342","1873"); foreach ($arr as $value) { // rest of code // }
View Replies !
Pulling Characters With GET Method
I am passing various text variables via a URL to a form that uses a command as follows: name="recid" value="<? echo $_GET['recid'] ?>" An example of a recid value that I am passing is 57L2J60)K#LLA:Y however this is being truncated to 57L2J60)K. What can I use to make sure that the full text is captured and not truncated?
View Replies !
Pulling Data From Two Tables
Basically the end result for this is to manage rental properties. "properties" is the main table that handles most the information. It has about 50 rows so I am not sure you need all the rows, but if you do let me know. The second table has floor plans. I named this table "floorplans". It has several rows: PlanID PropID - this is the same one from the properties table that they both share PlanName Size Bedrooms Bathrooms Den Price PriceTo Deposit SqFt UnitImg I am attempting to build a cataloging system and display the results as a set on the page. I am listing 10 items per page with various sub info on that page as well. Most of this information is in the primary 'properties' table, but I would also like to be able to list items from the sub table that match the primary ID all on the same page. A detailed page containing all the information on the subject would be easier to do since I could just call the ID from the $_GET on two separate querrys but I am trying to make a page to give previews before clicking through.
View Replies !
Pulling Right/Left Characters
How do I pull a specified number of characters either from the right or left? For example, the output is 123456 and I want to pull, separately, the right 3 characters (result: 456) and the left 2 characters (result: 12).
View Replies !
Pulling Lots Of Info From DB
I have a php script that pulls invoices from mysql table. The problem is that when there are a lot of invoices, say anything over 2500 all the info doesn't show up on the screen. In other words only, it pulls so many and stops. Is there a limit?
View Replies !
Pulling Out A Feature Profile
id like to pull out a feature profile on one of my pages, and allow it in the feature spot for 24 hours. All i need pullling out is the users picture, headline, location and name which i am fine with.
View Replies !
Directory Listing Pulling
A very simple directory listing isnt pulling all the files and I'm pulling my hairs trying to figure out why: PHP Code: function DirReader($dir){ if ($handle=opendir($dir)){ while($file = readdir($handle)){ if (is_file($file)) echo "<b>".$dir."/</b>".$file." is a file<br><br>"; elseif ((is_dir($file)) && (trim(str_replace(".", "",$file)) !== "")) { DirReader($dir."/".$file); } } } } DirReader("."); As you can see, not much to the code, but it seems to only pull 1 or 2 files, perhaps until it finds a directory, on any given directory.
View Replies !
|