Checkboxes Dynamicly Generated
I have a form with 3 checkboxes wich have all the same name:
<input type=checkbox name=test value=val1>
<input type=checkbox name=test value=val2>
<input type=checkbox name=test value=val3>
now on the target page i need all values that are checked, so if they are all 3 ckecked i need to get val1, val2 and val3 on the target page. With ASP you get the varaible test = val1;val2;val3 (the values are all put in one variable, separated with a ";"
But when i use PhP i only get the last value in this case "val3". What do i need to do to get all values? I have named them all the same because those checkboxes are dynamicly generated. I dont know how many there will be.
View Complete Forum Thread with Replies
Related Forum Messages:
Populating A List Dynamicly
Is there an easy way to populate a list dynamicly? It stinks javascript here, but I don't know how to do it with that either. I have one list A that contains enteries with ID's as values. List B should then fill with information from a database according to wich ID is choosen in list A. Since alot of otherthings is entered on the page to I would like to nopt have to deal with sending all the data and loading the same page again. Is there a way in PHP to link to the same page and have all the filled textfields stay as they were? Or do I have to use post? I have the thought of loading all the data from the database and having it in an array or something and having a javascript picking and writing the choosen ones to the list. But that would be alot of excess data so getting it "live" from the db would be better.
View Replies !
Displaying Dynamicly Created Images
I'm working on the registration page of my website, and am building in a system where the user has to read something out of a dynamically created image. I can create the image just fine, but how do I get it to display in a web page? Code:
View Replies !
Breaking Up The Query String Dynamicly?
using $Get_string = $_SERVER['QUERY_STRING']; to receive a query string such as month=may&$day=15&year=2006 so that $Get_string = "month=may&$day=15&year=2006" can I separate the values and turn them into variables? (like a normally would with a url get) $month = "may" $day= "15" etc it would be great to just do $_GET on the url but I'm sending the string as a variable to another script... so i can't just go the easy route.
View Replies !
Dynamicly Created Page, With Refereing Url Shown
I have loads of domain names but none have any hosting space associated. They are however all entered into my DNS, so when any of them are visited, the visitor ends up at the (unused) home page of my dns server. I would like to put a php (or perl, or whatever else is suitable) page here so the visitor is shown a more freindly page. So, for example, a "Welcome to domain.com, this page is under construction / for sale" type page is what I would want. So all I would need to do for each domain to have it's own page would be to enter the domains in to my DNS and the rest would be automatic.
View Replies !
Create A Query In Order To Dynamicly Popular A Listbox
I am trying to create a query in order to dynamicly popular a listbox however I am trying to fill the listbox with years such as 2007 etc based on if they are stored in the data base. The problem is that two tables have to be checked that have no relation to eachother but this caues the problem of duplication so if both tables have 2007 it will appear in the list more than once. Code:
View Replies !
Checkboxes - Form Is Not Working AT ALL For The Checkboxes
I want the user to be able to check a box in front of each fair he/she would like to attend and then proceed to providing us with registration details. Once complete, I want a reply sent to the client to thank them and indicate that his/her form was submitted. I also want the information submitted to be e-mailed to a particular address. (The information is not being submitted to a database) My form is working just fine for the submission of client details but is not working AT ALL for the checkboxes. The following is the code of the pages (the html registration page first, the php second) Code:
View Replies !
Php Script Generated By Php
I am trying generate a new PHP file from an existing page using PHP. Currently I'm using the output buffer to capture content destined for the page, and then am capturing that output and writing to a file. The problem I am having is that all PHP scripts within the new page content are executed and the results are written to the new file, when I would like the PHP code itself to be written to the new file, unprocessed. So now I am trying to just store the new page as a string and bypass the use of the output buffer, but do not know how to store php code within a string without having it execute...
View Replies !
Generated Textbox
I've got a web forum that has three buttons: next, forward, start. They serve as simple navigation through records of a mySQL database. I've also created a text box with php to display which record they are looking at: PHP Code: <? function textbox($the_name,$the_value) {    $_output = "<input type='text' name='".$the_name."' value='".$the_value."' maxlength=Ɖ' size=Ɗ'> ";         return $_output; } //Generate dynamic textbox         echo textbox('alpha',$number]); ?> This works great for display the record but I thought, what if I could have the user enter in a record also to this text box. I've got html forms that do just that using POST method, but it would be nice if they could do it right at that textbox. Any ideas?
View Replies !
Php.exe Has Generated Errors
I think this may be a Win 2K problem, rather than a PHP problem, but I've suddenly started getting error messages when I run PHP from the command line. For example, when I run "pear help" or "pear list", the windoze error message, "php.exe has generated errors and must be shut down. You will have to restart the program" comes up when the interpreter has finished. Code:
View Replies !
PHP Generated RSS Feed
I wrote a script in PHP that queries my news database and builds an RSS feed from it. Unfortunately, the RSS feed is invalid, according to Mozilla Thunderbird. My RSS feed is as follows: Code:
View Replies !
Generated Graphics
I am planning to use PHP to generate graphics Actually boxes that will contain either text or links I will use ImageCreate(), imageColorAllocate(), imageRectangle(), imageLine(), imageArc(), imageJPG() And I just realized that I have no clue on how inserting a text and positioning it? Where should I look to figure it out? CSS I am not in love with image positioning too many unacounted for variables such as browser etc.
View Replies !
Php Generated Mail
I have created an online form in html. i am using php to send the information as a mail to the desired email adress. The thing is that if anyone fills in an incorrect email adress, then it bounces back to my webhosting server. Those guys are now complaining that their server is being spammed. when it indeed is mails bouncing back from incorrect adresses. How can i make the mail bounce back to myself or just avoid any bouncing what so ever? The code im using for the mail function is: mail("$sender", "Thank you for registering!", $reply,"From: $onlinemail -Reply-To: $sender, $onlinemail");
View Replies !
Generated E_NOTICE
Could someone please let me in on the workaround for this: PHP Code: if(!defined(SD_CURRENT_TEMPLATE)) define('SD_CURRENT_TEMPLATE', 'sd-default'); It generates: Quote: Notice: Use of undefined constant SD_CURRENT_TEMPLATE - assumed 'SD_CURRENT_TEMPLATE'.
View Replies !
Caching JS Generated
Im developing a service where my registered users must include a javascript on their websites. Since each user has different config settings on my service, they must all identify themselves with an ID, for example, user John Doe must include this piece of code in his site: <script src="http://blabla.com/script.php?id=384" type="text/javascript"></script> That way the javascript that will get printed will use his own settings. What i need to do now, is to reduce my server's requests by properly caching the data. A friend told me to use this in the top of script.php: Code:
View Replies !
Php Generated Checkbox
I have some checkboxes and drop downs generated by php, the problem I am having is that on the check boxes which look like this: PHP Code: echo "<p>The price for Service 1is: £$service1priceprice, type of rate: $haircolourtype Tick the box if you want to enquire on this service:<input type="checkbox" name="haircolourselected" value="true"</p>"; When the page gets submitted however, the checkbox returns blank and of course as a result of this code setting up the post variables will enter a null value into the database instead of tru: PHP Code: if (!isset($_POST['service1selected'])) {        $service1selected = 'null'    }else{      $service1selected = $_POST['service1selected'];           }.
View Replies !
How To Farmat Php-generated Table
the font size declaration seems to be ignored. Is it possible to set format for tables generated with php? <?php echo "<table border=1 font size=8>"; echo '<tr><th font size=8>Date</th> <th>IP Address</th> <th>Operating System</th> <th>Browser</th> <th>Referring Page</th> <tr>' ?>
View Replies !
Getting MySQL Generated Keys
I am a Java/JSP developer by trade but am currently developing a MySQL/PHP solution. In JSP when I run an INSERT statement on the db I am able to automatically get back a list of any generated keys (without having to do some sort of subsequent query to get the information). Is there a PHP equivilent of this?
View Replies !
Php-generated Png Transparency Issue In IE
I've been trying to get my page, which works perfectly in Firefox, to work in IE as well. one problem was getting the .png images to display properly, which was fixed by doing this: filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='imagename.png') but what of php-generated .png files? putting the php file as the src doesn't work. the php-generated images don't work at all in IE (but work fine in firefox). (the php-generated image uses a transparent color made with imagecolorallocatealpha. when I just use imagecolorallocate it shows up, but is not transparent as I want it.)
View Replies !
Generated PHP Web Database Forms
I'm still gaining experiance in developing PHP applications, and have completed a couple of projects already. This has prompted me to look for ways to reduce the development time for web enabled database applications. Every web database has basic operations such as add,delete,update and search. I have been creating HTML forms and processing the results with php code. I have managed to reduce the number of forms required by using the smarty template engine. I want to go a stage further and be able to produce the forms and the processing code purely by looking at some sort of schema file , or using "mysql_list_fields()" and "mysql_list_dbs()". Before I start my quest of many late nights of coding. Can any of you guys give me a head start by pointing me at a solution/hint.
View Replies !
Generated Images Not Printing?
I have a problem with IE and generated images (jpgraph). It displays them fine but it's not printing them. They appear as little red crosses in print preview. I've fiddled with the cache control headers as I thought that was it. Certainly IE refuses to cache pdf files sent using fpassthru and cannot open them in acrobat.
View Replies !
Server Generated PDF Files?
Heres what I need to happen now, I know how to do most of it, except the generated PDF form. - The server puts that information into a PDF file with a background of my chosing and emails it to a specified adress. (Its already set up to send the email) My issue is I dont know how to have the server generate the PHP form. How does it work? How do I position the text over the PDF automatically? I'm already donating $10 to the site, thanks to the help I received from UTAlan, Lytheum, and Waldir. Ill make it a total of $20 after this.
View Replies !
Image Src Generated Through Php File
I've built a custom image gallery, integrated with a database. all of the images are kept above the document root in a "media" directory (for security purposes); therefore, i am using a php script in the src attribute of the image tags to display the image in the browser. to accomplish this, i chose to use the PEAR package "HTTP_Download", which worked great and performed fantastically on my staging server. I chose to use content-disposition inline, and set caching options on. the problem, the images don't cache on a users machine. therefore, everytime the page is changed to display a new image, all of the thumbnails are downloaded once again...very annoying. let me re-iterate, these files are not being generated on the fly, simply sent to the user via php. Code:
View Replies !
Mail A Php Generated Page
I ask if it's possible to sent to email a php generated page as an html attachment or text file !? I have searched on google, but I find only how to send mail from php not hot to send a page. Any link, or doc is helpfull ! The story: I have a long products list, from where I select some items what I want to send as a price list to some people.
View Replies !
PHP-generated RSS Feeds And .xml Files
I want to make an RSS feed for my site. Obviously, it should be dynamic, so the only way that comes to mind is to use PHP to create the RSS. But then the filename will be .php. Most of the sites I see with feeds (digg, shoutwire, cnn, etc) have .xml files. How do they do this? I would like to have a .xml that is dynamic/always up-to-date.
View Replies !
Randomly Not Generated Whole Page
I bump into a weird problem. Randomly a page is not fully generated. When I reload a page most of the time it's OK but sometimes (without any apparent logic) only a part is generated and sometimes some PHP errors appear (about missing functions, unfisnished regexp etc.) as though some scripts were not properly parsed or loaded. The application itself ran without any problems on other two servers. The server where the problem occurs is FreeBSD, PHP4 with AfterBurner accelerator. Unfortunately, I don't have access to the server, so I cannot check further settings and logs. Does anybody have an idea what can be going on?
View Replies !
Ampersands In Generated URIs
The way I read the following apache page . i should be able to put this line php_value arg_separator.output & in an .htaccess file, so that all the ampersands in URIs generated by php are converted to & It's not working for me ye. what I've done wrong?
View Replies !
Emails Generated By Php Mail
I'm having a serious problem with the emails generated by php mail script on my sites. All works perfectly well (or has done up to npow) There is nothing wrong with the script. Here is an example of the script: Code:
View Replies !
Storing A Thumbnail Generated By Gd On DB?
I'm still working with this gallery thing if you read my posts a few days ago! Look, I've got some thumbnails generated with gd from pictures sent over a form. To store these files on the database I would use something like: Code:
View Replies !
What Does Adobe Think Of PHP-generated PDFs?
I've been making PDFs with PHP. Many of us do. Does anyone know what Adobe thinks of that? Have they ever released any comments regarding unlicenced use of their proprietary format? A few years back, Compuserve made a real stink about its patent on GIF compression. GIF images were so ubiquitous, many assumed it was just a non-patented generic graphics format. At the time, geek media pundits were saying we'd all have to start using PNGs, or start paying licence fees to Compuserve. Is this a similar situation, and are we going to get busted for reverse-engineering Adobe's Portable Document Format?
View Replies !
Dynamically Generated HTML
I am trying to fit dynamically generated HTML into a variable so I can mail it out to a recepient. Now - the catch is that the dynamic generated HTML contains nexted regions which mace some heavy duty use of "if" and "while" statements. Here is a code snippet example: $msgbody = "<a id="top"></a> <table width="100%" align="center"> <tr><td><span class="style3">$mailinga[analysis]</span></td></tr></table> <br />" ----> this is where the error occurs - it says unexpected T_IF <---- if I set a semicolon after the quotes above it will not include the stuff below, and I tried other combinations of symbols and googled the issue but no go - please help. ---->:( if($asnc > 0) ................
View Replies !
Save Generated Images
I have this php code that receives variables form flash to create image which works fine. what i want to do is save that image after its been created on my server instead of showing it as is in the code below....
View Replies !
Navigate Pages Generated
Mentioned below is a PHP function , which can be used to navigate pages generated from the select query . ie. in the form of << Previous || Next >> <? function PagerNextPrevious(&$sql,$pagesize,$class='txt'){ // Set Default Page Size to 20 if($pagesize=="") $pagesize=20; $page=get_post('page'); if($page!='NA'){ $beg=($page-1)*$pagesize; $end=$pagesize; }else{ $beg=0; ...................
View Replies !
Bots And Php Generated Text.
I understand that bots (as far as we know) cannot desipher text and html code rendered by JavaScript. Would the same sort of thing apply to text or html rendered by PHP?
View Replies !
Ticket System Generated In Pdf
I would like to make some sort of ticket system, but I'm still a newbie with php. What I'd like to have is the folowing: someone fills in his name and adress, these will be stored in a database. (this part I can make myself ) after I have checked there payment I want to send them a code. the user can now fill in this code in a form, when he does that a ticket will be generated in pdf with a unique code on it. (ofcourse this unique code needs to be send to the database too, because I have to be able to check if the code is valid).
View Replies !
SE Friendly Auto Generated
Could someone make a php script that will read a specified file and grab all of the links (and corresponding link text) in the file, and re-generate the links but only display 50 of them. If there is more than 50 of them, the script will automatically add a next button, to go to the next page of the links. and so on until all have been displayed. Since googlebot and other bots only grab up to 50 (or 100?) links on a page, i think a lot of ppl would find this useful. Reason I want it: I have a news archive page. On this news archive page I have links to every week of news on my site (well over 400 links). Bots won't crawl past about 100. so i need a script.
View Replies !
Parse Generated Source
My PHP experience has moved seriously in the direction of bots, parsing etc. find all that stuff quite interesting. The problem is that I'm trying to parse some pages which are Ajax/JavaScript generated, so the code that CURL etc. retrieves is nothing like the code that actually ends up there. I was wondering if anyone knew a tool or anything to identify *where* the page code actually exists. (Generally which scripts are being called in the browser to supply the HTML via DOM.
View Replies !
Pagination With Dymamically Generated SQL?
In reading all the articles on pagination, I understand I need to pass variables into the resulting URL to allow for $_REQUEST or $_GET of the variables. But I have set up a dynamically generated SQL statement. What's the best approach to pass only the required variables? Code:
View Replies !
Dynamically Generated Calendar
in a book that i've been reading/ read, there is a project example in which a calendar and its tables are drawn by php, using mktime and getdate, and checkdate, etc. it is only a display calendar, using html select element (also created dynamically) for the user to enter a month in a year in which he or she wants to see that month of the calendar. i'd like to take it one step further by making the cells clickable so that data can be entered, and the event data would be stored in MySQL.
View Replies !
Page Generated In XXX Seconds
I was reading a post here and toplay referred someone to the http://theomega.org/ for captcha info. I went to checkit out and noticed that on the bottom of the page it said: Page Generated In: 0.1911 seconds.
View Replies !
Mysql Generated Lists
I have a page where I am populating a list from a mysql database table with a variable passed from a previous page. code snippet: PHP Code: // set varibles $company = ($_POST['cds_user_company']); $pass = ($_POST['cds_passtext']); // Query the database $query_plist = "SELECT * FROM cds_projects WHERE cds_company - $company ORDER BY cds_proj_name DESC"; $result_plist = mysql_query ($query_plist) or die ("query_plist on project_list.php failed to run"); // Run the query. echo '<table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> Â Â Â Â <tr> Â Â Â Â Â Â Â Â <td width="205" valign="top">' echo '<br><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Select Project :</br></br>' ......
View Replies !
Generated Thumbnail Link
I have a script that generates a thumbnails of all the images in a givin' directory. This thumbnail is also a link to the full size image. My problem is, I would MUCH prefer if this link, was a target blank, or 'open in a new window'. I cannot figure it out. I think this is the area of the code that I have to edit: PHP Code: if ($useAutoThumbnails && $f["filetype"]=="image") { Â Â Â Â Â Â Â Â $f["thumbnail"] = "<a href="".urldecode($f["link"]).""><img src="".$PHP_SELF."?thumbnail=".urlencode($path.$f["name"])."" style="text-align: left;" alt=""/></a>"; Â Â Â Â } I'm not positive though as there are so many calls for 'thumbnail'.
View Replies !
Generated Table Error.
I was working on a clothing site and I was looking to organize the shirts in a table generated from the DB. I got it working fine going in columns and rows like i wanted, but for some reason it's not pulling all of the posts in that table. Right now there is 9 shirts in the table and it's only displaying 8. I looked at my coding and can't seem to figure out what the problem may be. Code:
View Replies !
Problems Saving Gd Generated File
I'm using the gd library to build graphs from db generated data. I can output the result to the browser with no problems, but when I try to save the image, I get the following error message.
View Replies !
PHP Generated Pages & Search Engines
I'm trying to get a basic idea of how well PHP generated pages can be spidered by search engines? I'm working for a company that keeps two versions of it's site at the moment. One copy run off of a database using CGI, and one copy entirely in HTML so search engines will find them. I've told them that this is just a bad idea, and far too time consuming. I'm under the impression that PHP pages can be found by search engines, am I wrong? I'm going to be running almost their entire database of products off of one file, will the search engines be able to find these if there aren't direct links to them? Any other suggestions as to how to keep their positions in the search engines (very good right now) would be appreciated as well.
View Replies !
PHP 5 Compilation Error: Libphp5.so Is Not Generated
I started from a clean, new system, with only SSH and Webmin. It's a VPS running on Fedora Core release 2. 1) I added my domain name to the BIND server 2) I downloaded the last stable Apache version, 2.2.3, and installed it using: ./configure --prefix=/usr/local/apache --enable-so --enable-module=rewrite make make install 3) I tested it, it worked. 4) I downloaded the last stable PHP version, 5.1.6, and installed it using the MINIMUM configuration possible (not even MySQL): ./configure --with-apxs2=/usr/local/apache/bin/apxs make make install "make install" gave me that error: ================================== [root@server php-5.1.6]# make install Installing PHP SAPI module: apache2handler /usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la /usr/local/apache/modules /usr/local/apache/build/libtool --mode=install cp libphp5.la /usr/local/apache/modules/ cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a ranlib /usr/local/apache/modules/libphp5.a chmod 644 /usr/local/apache/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /root/zzz/php-5.1.6/libs' Warning! dlname not found in /usr/local/apache/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache/modules/libphp5.so chmod: cannot access `/usr/local/apache/modules/libphp5.so': No such file or directory apxs:Error: Command failed with rc=65536 ================================== The problem is that libphp5.so is not generated from "make". I found those related links: http://www.fedoraforum.org/forum/archive/index.php/t-23665.html http://bugs.php.net/bug.php?id=27795 Following the recommendations I tried: 1) using the bz2 version of the PHP distribution and not the gz one 2) I installed getText ( http://www.gnu.org/software/gettext/ ) because some say an included library, "libintl.so", could help. But I couldn't find that library after getText was sucessfully compiled. 3) I chomed everything to 777 in the php directory 4) I installed the last stable libtool, 1.5.22 Nothing worked, I still have that libphp5.so error. Any help would be really appreciated. And I really mean it!
View Replies !
Dynamically Generated Results Table
I'm trying to write a script that dynamically generates HTML tables depending on the results from an SQL query. So far, I have managed to set the HTML table headers to be the same as those in the MySQL table. [thanks to rod k -cheers !] Now i'm trying to put the results in the table. Basically, I need a MySQL function to retrieve data and put it into the table until there is no data left.... (At the moment I am using "mysql_fetch_array()", but with this it is necessary to know the names of the columns to retrieve the information for each result set. Since my table is dynamic and should be able to build itself from different MySQL tables, the column names aren't fixed and so i can't use this to put the data in the tables...)
View Replies !
Are Multiple GD Generated Images Possible On One Page?
I've been experimenting with generating PNG files via PHP and GD. All was going fine, until I tried to put more than one image on a single page. <img src="draw.php?text=Picture1"><br> <img src="draw.php?text=Picture2"><br> <img src="draw.php?text=Picture3"><br> The example above produced 3 images, but they all have 'Picture3' on them. Seems like theres only 1 temp storage area for the images?
View Replies !
|