Jump to content

$_GET not working "10 seconds from your time please"


mecano

Recommended Posts

here is my problem ,

 

i have "upload file link" , when some body hits it i want a new page to be opened to ask him for the uploaded file , all of this is ok , but when i try to take the number of which link does he clicked on he cannot get it .

 

example :

 

i have

 

upload to folder 1

upload to folder 2

upload to folder 3

 

so i want to get which one on these did he clicked on ,,

 

i used ......php?selectedfolder=theclicked one

 

but the problem is am not using this variable when i click on the link , am using it after words when i click upload ..

 

so its a home page with links ----> then upload page -----> user press upload "where i need the variable from the first page "

 

so its not working an spending more than 20 hours in it ,,,,, i dont want code ,  i only want the idea why this is not working

Link to comment
Share on other sites

thanks in advance for your help of course here is the important parts of the code as not to waste your time :

 

here is the main page :

 

echo '<a href="publish_file.php?tselectedyear=' . $yrs[$temp1] .' "> add files </a>';

 

and here is the publish_file.php page

 

<form action="publish_file.php" method="post" enctype="multipart/form-data">

<p><b>File Title:</b> <input type="text" name="file_title" size="70" maxlength="70" value="<?php if (isset($trimmed['file_title'])) echo $trimmed['file_title']; ?>" /></p>

<input type="hidden" name="MAX_FILE_SIZE" value="5000000" />

<p><input name="uploadedfile" type="file" />

<div align="center"><input type="submit" name="submit" value="Upload" /></div>

<input type="hidden" name="submitted" value="TRUE" />

</form>

 

 

and here is the php part :

 

$tselectedyear=$_GET['tselectedyear'];

 

here it tells me the error "Undefined index: tselectedyear "

 

---------------------------------------------------------------------------------------- i really spent very long time in it , so it will be a miracle for me to get it solved , i made many pages like this before , but we where using the ?url part in the next step , not in the step after the next , i hope you understand me .

Link to comment
Share on other sites

its solved , i ve tried this idea but it didnt work with me ,,, but when i copy pasted what you wrote it worked ,,,

 

am so happy to the point that i want to give you my credit card number :) ,,, really if you r havin a site or somthing i will 100 % buy your products now ...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.