suzzane2020
-
Posts
233 -
Joined
-
Last visited
Never
Posts posted by suzzane2020
-
-
hmm
actually i want to bring to your attention that
if i create the folder manually and give it permissions .the same script works great!!!!
its only when i use the mkdir and the chmod function.
But i need to use them too ???
-
somebody...anybody ???
-
Hi,
I have a strange issue here.
I have written a script to make a directory and ten copy a file to that directory.
I have given the directory full prmissions using the chmod function.
The directory is created but am not able to copy the file.
here is the code
if(isset($_POST["reg"])) { $brand = $_POST["brand"]; $file_name = "template1.php"; $file_path = "brand_sites"; if(!is_dir("$file_path/$brand")) {mkdir("$file_path/$brand/"); chmod("$file_path/$brand/",0777);} if(copy("$file_path/$file_name","$file_path/$brand/$file_name")) { print "Copied"; } }
Whats strange is that -if i create a folder manually and give it permissions the file can be copies using the function.
could anyone please throw some light on this problem.
thank you
-
??? not working..its still not checkin for more than one spaces.
chigley - no ur method does not work too. but thanx or trying to help
-
sorry for the late response ,i was trying out all the options u gave me.
but the in the option
if(ereg('^[[:space:]]*$', $string){
echo 'error! cannot contain just spaces';
}
the prob is that it checks for only one space character
just not working
-
obsidian- its not working.still gives no error. But when i echo the string ,nothing appears
red arrow-
--invalid
If the string contains nothin but spaces i want to show an error.
-
Hi ,
I have a prob here that is drivin me nuts..
I am using a FCK editor and i want to validate the textarea value.
I want to check if the value contains only space characters and if so give an error.
I have tried the trim function but that is not working.
I wud really appreciate if someone cud help
-
First of all y wud u want to place a session id in a url?
coz a session value can be obtained by just using print_r($_SESSION["sess_name"])
-
ok
In the query you use to get the images from the databse;
include a keyword DISTINCT
for eg: select distinct(image),and all the other fields u want from tblname"
that way when u use distinct, images with the same name or url wud not appear
I hope u gt it
-
if u have stored the image names in te database, try using the keyword DISTINCT in ur mysql query.
distinct(image)
-
this
<?php include("system/replace.php"); ?> <form method="post" action="index.php?show=artikel"> <?php $sql="SELECT * FROM artikel ORDER BY id"; if(!empty($artikel)) { $sql="SELECT * FROM artikel WHERE category='$category' ORDER BY id LIMIT 1"; } $data2=mysql_query($sql, $db); while ($artikel = mysql_fetch_object ($data2)) $num=mysql_num_rows($res); if($num!=0) { while($row=mysql_fetch_object($res)) {
wud be this
<?php include("system/replace.php"); ?>
<form method="post" action="index.php?show=artikel">
<?php $sql="SELECT * FROM artikel WHERE category='$category' ORDER BY id LIMIT 1"; }
$data2=mysql_query($sql, $db);
$num=mysql_num_rows($artikel);
if($num!=0)
{
while ($artikel = mysql_fetch_object ($data2))
{
-
First of all u have an extra query here which is nt required
<?php include("system/replace.php"); ?> <form method="post" action="index.php?show=artikel"> <?php $sql="SELECT * FROM artikel ORDER BY id"; if(!empty($artikel)) { $sql="SELECT * FROM artikel WHERE category='$category' ORDER BY id LIMIT 1"; } $data2=mysql_query($sql, $db); while ($artikel = mysql_fetch_object ($data2)) $num=mysql_num_rows($res); if($num!=0) { while($row=mysql_fetch_object($res)) {
and in the code above the number of rows shud be taken for the main query .ie
the query that displays the records
change it to the code i gave before
it will work
-
ok so all u wud need is this query
<table style="width:95%" cellspacing="1" cellpadding="0" class="forum"> $res=mysql_query("SELECT * FROM artikel WHERE category='$category' " ) $num=mysql_num_rows($res); if($num!=0) { while($row=mysql_fetch_object($res)) { <tr><td colspan="2" class="headb"> <?php replace("$artikel->headline"); ?> </td></tr><tr><td colspan="2" class="leftc"> <?php replace("$artikel->text"); ?> </td></tr><tr><td colspan="2" class="headb"> <b>Kommentar</b> </td></tr><tr><td colspan="2" class="leftc"> <?php replace("$artikel->comment"); ?> </td></tr> <?php } }else{ echo "no records"}?> </table><br>
-
Not so clear about how you want to display it. Is it this way?
Category1
Headline
Comment
Text
Category2
Headline
comment
text
etc...
-
hmm ya thts rite..
cant be sure if the download was successfull...
-
When the download link is clicked save a record in the databse with the file name or id and a status yes or no
when the download is clicked set it as yes and if not by default 'No'
So u just need to check the value in the databse and display Yes or no
-
place session_start at the very beginning of the script ..not in the condition
-
u mean the images shown in that url?
i get it fine when the page is refreshed?!!!
-
The point is : watever the user inputs in the field will be taken and compared to wats there in te database
so u dont have to take any letter from that
I hope u got wat we were tryin to say
-
ha ha nw thts coincidence!!!
-
http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html
check this out-Pattern Matching
for eg if u need names containg or starting from a
select * from table where name like ' %a%'
will give u names containing the letter a
-
ummm cud u be more specific
is this wat u had in mind?
product small- image -big preview image
-
ok i guess u dint get me.
i meant when i help smeone by replyin 'they' do not respond!!!!
-
Ita really upsettin when u take time for people who ask for it, go out of the way to help them,
and then dont get any kinda response.
they either dnt reply or just wham!! go offline
is ther smethn we can do about this?
issue with copy function
in PHP Coding Help
Posted
ok let me try that