Search found 9 matches

by chris122380
Thu Aug 09, 2012 4:30 pm
Forum: PHP
Topic: Link upload files to a MySQL database and then link files
Replies: 5
Views: 10823

Re: Link upload files to a MySQL database and then link file

Thank you the echo mysql_error(); helped me a lot in looking for the solution. My upload is now working correctly with a drop down menu. Updated and working code. index.php <?php // index.php // create a droptdown menu and upload form // connect upload file name to the dropdown menu field. // Chris ...
by chris122380
Wed Aug 08, 2012 9:51 pm
Forum: PHP
Topic: Link upload files to a MySQL database and then link files
Replies: 5
Views: 10823

Re: Link upload files to a MySQL database and then link file

Well, you would have to create an INSERT query in your upload.php. The way I usually do this is to link the file by it's ID in the table. I have added $option = $_POST['spec_drop']; mysql_query("INSERT INTO operation_manuals (manual_ID, manual_status, spec, manual_name) VALUES('','','$option',...
by chris122380
Wed Aug 08, 2012 3:16 pm
Forum: PHP
Topic: Link upload files to a MySQL database and then link files
Replies: 5
Views: 10823

Re: Link upload files to a MySQL database and then link file

My table (operation_manuals) has two fields spec (Spec is a foreign key that links to a table with the list of spec numbers and there descriptions) and manual_name. The drop down menu pulls the spec number from the spec table. The file name needs to be linked with the spec number as I may need to re...
by chris122380
Tue Aug 07, 2012 9:15 pm
Forum: PHP
Topic: Link upload files to a MySQL database and then link files
Replies: 5
Views: 10823

Link upload files to a MySQL database and then link files

I would like to upload files and assign them to a database field and then query that database with links to those uploaded files. This is as much as I have programmed and now lost. Any help getting this to work would be great. (Thanks to all those who have helped me so far and to YouTube for helping...
by chris122380
Mon Jul 30, 2012 9:14 pm
Forum: PHP
Topic: PHP hyperlinks in a iFrame passing to a iFrame in index.php
Replies: 4
Views: 2034

Re: PHP hyperlinks in a iFrame passing to a iFrame in index.

Now I am trying to figure out how to clear the iframe when clicking on a link that doesn't use it. That's not going to be possible :( Links can only affect an Iframe if their target is set to that frame. You will have to try some JavaScript to get it to work. You could also add a clear link which w...
by chris122380
Thu Jul 26, 2012 9:40 pm
Forum: PHP
Topic: PHP hyperlinks in a iFrame passing to a iFrame in index.php
Replies: 4
Views: 2034

Re: PHP hyperlinks in a iFrame passing to a iFrame in index.

I have figured out how to pass the page to the iframe. Had to move the echo and the endwhile to the body of the html. Like so, <body> <a href="spec/<?php echo $_SESSION['spec']; ?>.pdf" target="pdf"> <?php echo $_SESSION['spec'],' ',$_SESSION['discription'], '<br />'; ?> </a> <?p...
by chris122380
Thu Jul 26, 2012 9:38 pm
Forum: PHP
Topic: export data from a while loop
Replies: 2
Views: 874

Re: export data from a while loop

Problem solved.
<body>
<a href="spec/<?php echo $_SESSION['spec']; ?>.pdf" target="pdf"> <?php echo $_SESSION['spec'],' ',$_SESSION['discription'], '<br />'; ?>   </a>
<?php endwhile; ?>
</body>
by chris122380
Thu Jul 26, 2012 8:54 pm
Forum: PHP
Topic: export data from a while loop
Replies: 2
Views: 874

export data from a while loop

I have a database that I use a loop to assign variables to it's fields. The loop then exports the data into a variable that also loops to make a list. Is there a way to have the echo do the same thing outside the loop as it does in the loop? This way the list and variables still exist after the loop...
by chris122380
Thu Jul 26, 2012 3:37 pm
Forum: PHP
Topic: PHP hyperlinks in a iFrame passing to a iFrame in index.php
Replies: 4
Views: 2034

PHP hyperlinks in a iFrame passing to a iFrame in index.php

I am working on making a php site and am fairly new to php. The home page index.php has two iframes one on the left (name=pages) and one on the right (name=pdf). Above the iframe on the left are CSS buttons to open php files into the left iframe. One of the php files (Spec_list.php) opens with links...