/    Sign up×
Community /Pin to ProfileBookmark

Hello,

i am having a page (i am starting a session here in this page) which shows some Email Broadcast screen ie one can email to one or many persons from that page

in that page i have given a link for adding an attachment(that link opens into a new window(like a pop up one)) ; in that attachment window one or more files are getting attached first and then getting uploaded on the server from there only (from that pop-up window only) (also the session remains here too so that i can fetch the whole url of the file that has been uploaded onto the server into the main Email Broadcast page)

now the problem i am getting is that i am not getting the url of that file into the main page (this was working previously) so the file that i am adding as an attachment here in this Email Broadcast page is not getting attached

during debugging ,i see the url echoing as “NULL” ie i am not getting the url of that file from the pop-up window into the main Email Broadcast Page

i dont know whats getting wrong there
[B]note that in all of the pages i am having “session_start()” at the very beginning of all the files[/B]
can u suggest me something else
here i am giving some code snippet which will give u better idea of what is happening here

==================UPloading on to the server====================

<form name=”pform” enctype=”multipart/form-data” action=”upload_next.php” method=”post”>

<tr>
<td width=”100%” height=”25″>
<p align=”center”></td>
</tr>
<tr>
<td width=”100%” height=”40″ >

<p align=”center”>
Select File :
<input type=”hidden” name=”MAX_FILE_SIZE” value=”50000000000″>
<input name=”userfile” type=”file” size=30><BR>

///////////////////////// form ends here

/////now how the processing of uploading is getting done /////////////////

$fname = $_FILES[‘userfile’][‘name’];
if($fname==””)
{

}
else
{

$uploaddir = “./userfile/”;

$tmpname = explode(” “,$fname);
$tmpcount = count($tmpname);
$finname = $tmpname[0];
for($t=1;$t<$tmpcount;$t++)
{
$finname = $finname .” “. $tmpname[$t];
}
$fname = $finname;
$pic= $fname;
$tt = $fname;
file_name_uploaded = $fname; ///this is the variable that is iam taking into the main Email Broadcast page as an attachment name
$myp=$pic;
if(move_uploaded_file($_FILES[‘userfile’][‘tmp_name’], $uploaddir . $_FILES[‘userfile’][‘name’]))
{
rename($uploaddir . $_FILES[‘userfile’][‘name’],$uploaddir . $myp);
}
else
{

}

$count++;
$n++;
}

$_SESSION[‘uploaded_files’]=$file_name_uploaded; ///this is the variable that is iam taking into the main Email Broadcast page as an attachment name

=========================================================

=============PROCESSING IN EMAIL BROADCAST PAGE==============

[B]$files = $_SESSION[‘uploaded_files’] ; ///same variable i am taking[/B]

$from_email_id = $_SESSION[’emailids123′]; //these are array of email ids
$subject= $_
SESSION[‘subject’]; /// same for subject
$message = $_SESSION[‘message’]; ///same for mesage

[B] var_dump($files); /// PRINTING THIS GIVES NULL ////////////[/B]

==========================================================

-ashish

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 20.2006 — Pleas read [url=http://www.webdeveloper.com/forum/showpost.php?p=546768&postcount=5]this FAQ[/url], then edit your post accordingly.
×

Success!

Help @ashishrathore spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...