priti
-
Posts
461 -
Joined
-
Last visited
Posts posted by priti
-
-
i tried something like this
http://localhost/test/test.php?name=1,2,3,4,5
adn in php file i did
print_r($_GET);
and output was
Array ( [name] => 1,2,3,4,5 )
try like this and let us know your script's output.
-
try,
SELECT sum( amount ) , date
FROM test
GROUP BY (
`date`
)
-
@pritii: think hes trying to prevent other people from accessing the admin.php page..
@jkkenzie: you can put a admin login in admin.php
@vbnullchar My intention to ask this is what may be the reason that index.php and admin.php has to be in same place ??
-
hi,
can you explain what you meant by "the reason for them being on same folder is so as to be accessed via internet for manipulating the database" .....
i think if you create a single file for database connection then you can include that file anywhere in your web app. so ... i get confused what exactly your idea to keep these two file together.
Regards
-
I am looking to write a script to bring up hotel rates fast. My question is when I have the url which will bring up rates and use file_get_contents it does not bring up the correct information that I need but if I load that exact url I used in file_get_contents right up into the browser or even load it in an iframe it works flawlessly.
That is the url I am using and if you copy/paste that in the browser it works fine. Using file_get_contents loads another page all together. Any reason for this or a way around it? Thanks for your help!
what is your allow_url_fopen setting in your php.ini??
-
i don't have any dummy example which match your requirement as you already have the file upload script with you then you can start going step by step.
i will suggest
first: write a php function to list the directories inmain directory
create a directory on server called 'userUploads' chmid 777
and create some subdirectory in this
like
userUploads
-flowers
-trees
-plants
(sub directory is your choice)
now write a php script to fetch userUpload and try ot list these sub directory.Once you are thru with this then create a ajax request to call that function and output them on your html form.
finish this much and let me know if you get stuck in somewhere while doing this.
Regards
-
gr8 kindly share the link :-)
-
If you are aware of Programming then my simple suggestion will make you life easy
i.e
<form name='frm' action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
$_SERVER['PHP_SELF'] will post the form to the same page and you can recognize weather form is submitted or not.If you don't want to do this in PHP then you can also work with help of javascript.
Regards
-
curious to know about this ...is it a single string or array of string 'link1name'???
'link1name' => '', $board['name'], ' Home',
-
hi,
can you check $query['partnerID'] ..... this variable what it return i mean check your query once.It might be returning 5 hence it every time get set to 5 and write your code
if(!isset($_REQUEST['partner_id'])) //if not found in $_GET
{
execute your query
}
Regards
-
Before inserting the new random number simplY check USING - in_array($arr,$new_random_num).if it return true select another random number and proceed.
Regards
-
well you can google for file upload there is a very good article oon this on tizag i think.just googleit they have a nice article on it.
For more read
http://pear.php.net/package/MIME_Type/docs
this would be more helpful.But,first understand the basic file upload in PHP.
regards
-
hi,
$_FILES['userfile']['type'] can help you to find the type of file
NOTE: The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.
Regards
-
This is the most opted way to connect to Db.you can also use database connection classes availabel on PHP classes or PHP freaks tutorial also if you follow OOPs in your coding approach.
let someone else experienced also speaks on this topic.For security issues the discussion is endless so i think someone else should also speak on this.
Gr8 day
-
Hi,
If not wrong then you suppose not to allow your user to upload files anywhere on your server.Hence you would be having specific directory where user can upload their files.
Simply set $target_path=path/to/main/directory.
on user side list already existing directory this can be done by making ajax request to list the directory in the main directory.The user is having the option to select any of the one hence thru form you can send the $target_path and upload your temp files to $target_path.
this tweak will be done in both php and html file .
For showing the uploaded document you can do it also.Simply when the file is moved check if file_exists($newly_uploaded_file) on server and show that in html form.
Regards
Regards
-
Hi,
I had never came across with exact example which mataches your requirement ....... sorry
-
What is the size of your file????
and which error are you receiving?
-
Hi,
'>' you have to insert in db
'<' you have to delete in db
when a user clicks '>' make an ajax post request to passing act=insert in php action file you can very well get this POST and perform an insert and display song inserted in your list.
similar will happen for < you need to change the query .i didn't get you exactly where you got stucked...
Regards
-
check for the browser compatibility.
-
it is a javascript error....
first do one thing create a single string for all xml i.e
$xmlstr= '<?xml version="1.0" encoding="ISO-8859-1"?>
<person>';
while($row = mysql_fetch_array($result))
{
$xmlstr.= "<firstname>" . $row['FirstName'] . "</firstname>";
$xmlstr.= "<lastname>" . $row['LastName'] . "</lastname>";
$xmlstr.= "<age>" . $row['Age'] . "</age>";
$xmlstr.= "<hometown>" . $row['Hometown'] . "</hometown>";
$xmlstr.="<job>" . $row['Job'] . "</job>";
}
$xmlstr.="</person>";
//do echoing after completion of your xml
echo $xmlstr;
now after chaging this tey to alert(xmldoc) i.e your responseText and see wether correct xml is received or not.Use firebug(extension in firefox) to track your error.
Regards
-
your form - post size should also be more.
to increase it use php.ini and set post_max_size.
upload_max_filesize = 10M ;
post_max_size = 20M ;
and remember to check your memory_limit notable point is :memory_limit should be larger than post_max_size
Regards
-
I got it!!
thanks so much priti
you most welcome
-
upate your script to fetch firstname of user also.
$qry="SELECT member_id,member_firstname FROM members WHERE login='$login
then
$_SESSION['SESS_First_NAME']=$member['member_firstname'];
and ahead you can use i suppose where ever you want to echo it you can
welcome. $_SESSION['SESS_First_NAME']
-
Diffcult to track.
Kindly define CSS for your page.It will also help you in the tracking.
you can just go thru once in your code and find the looping zone and look out for this intro section are you printing it again and again.
it couls be something like this kind of problem.
Kindly look in to it.
regards
File Quantity
in PHP Coding Help
Posted
this link may be useful to you
http://in.php.net/readdir