- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
24 Posted Topics
I am helping a friend switch from Godaddy quick shopping cart to magento. Unfortunately the Godaddy cart automatically creates product and catalog URLS. Using caps, dashes and underscores. I can dupe the link text but magento only allows dashes and no caps, I'd rather not use caps or underscores anyway. … | |
Re: You appear to be using to many loops. Simplify your code, use the $_FILE array to insert file info in the database and folder. This should require only one loop to accomplish. Your sepearation of the $_FILE array ($imggall, $imgtype) serves no purpose, especially outside of your loop. check the … | |
Re: var product = document.getElementById('s_product'); product.addEventListener('change', triggerFunction, false); change should be what you need for a select box. triggerFunction does the work after the user makes a selection. you will need to research this but theres plenty of documentation, you will need to research the POST / GET Ajax functions as … | |
Re: some good advise here, all I can add is after you get the basics, focus on OOP. Learn how to use objects appropriately. Save your self from learning bad habbits. OOP will teach you how to focus more on the scope of your projects and not just a piece of … | |
Re: Javascript/Ajax is a good way to handle timeouts but don't rely completely on it. you will need some PHP to check the timer as well, sessions and even setting the time in a table is good practice. If JS is disabled then they are free to do whatever they want. … | |
Re: the error is at 'else' on line 17. there is no 'if' to 'else'. You should break after your switch cases as well(ok = true; break;). may not cause issues right now but you should always end the excecution when the conditions have been met. | |
Re: this code snippet is written with dirty values? why write code for semeone and allow dirty values in one of the most vulnerable of php functions? sanitize the post values or suffer the consequences. | |
Re: remove the last character from a string $data = substr($data,0,(strlen($data)-1)); | |
Re: what diafol was saying is that you can't send mail from a local machine without the proper software installed. anyway there is little help to offer without seeing the code you have. are you testing your form from this site you linked? | |
Re: you don't appear to be passing $p to user_class(), unless it is a defined variable for your class then there is no way for the method to get that variable data. function add_user($p) | |
Re: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://mysite.com/</loc> <lastmod>2012-09-16</lastmod> <changefreq>Weekly</changefreq> <priority>0.9</priority> </url> <url> <loc>http://mysite.com/about.php</loc> <lastmod>2012-09-16</lastmod> <changefreq>Weekly</changefreq> <priority>0.8</priority> </url> <url> <loc>http://mysite.com/something.php</loc> <lastmod>2012-09-16</lastmod> <changefreq>Daily</changefreq> <priority>0.7</priority> </url> <url> <loc>http://mysite.com/contact.php</loc> <lastmod>2012-09-16</lastmod> <changefreq>Monthly</changefreq> <priority>0.6</priority> </url> </urlset> not sure what youre trying to test locally but your sitemap don't mean much on a local server so you … | |
Re: theres nothing wrong with redirecting the user to a success page. It's probably your best option. Man that code is jacked up though, no cleaning or validating? if($_POST){}, I remember those days. seriously though its a bad idea to present the form after a successful submission. you could have the … | |
Re: tinyMCE handles copy paste from word, it has a plugin that comes packaged with tiny. they have a real nice image loader that you can buy | |
Re: what is BasicLevel? is this set? is it a variable from the page? you may need a subquery in your SQL "UPDATE users SET BasicLevel = (SELECT BasicLevel+1) where username='Admin'" | |
![]() | Re: I didn't think you could set up a local server with email unless you have an email client to handle this. you could try setting it in your email file code: phpini_set("sendmail_from", "info@mydomain.com"). I heard this works ![]() |
Re: Did you give the field a value? printing an empty string will give you no results. You would have to use something like var_dump() to at least recieve some type of acknowledgement that the variable was past in the post. I see no reason to use a session for this, … | |
Re: you can't really make a gallery like your talking about with PHP, at least I think. you need ajax or JS or the page will reload and jump around which is a poor design for a gallery. And far as the page.php?pic=2 can be almost anything you want it to … | |
Re: isset should almost always be used, you should init your vars as well. you can init your vars to NULL then use isset in your form handling or init your vars to an empty string (= '') and check for an empty string in your form handling; or a combo … | |
Re: get the included files then check that the file is included. $myFiles = get_included_files(); if that helps at all. | |
Re: the test code you posted above is to simple to fail. change the extension! I'm curious, why would you not change the extension? you are trying to force the html page to do something it was never meant to do? | |
Re: if the the main file is not PHP then you will need to to change it to a PHP file. you can't put a PHP code block in an HTML file end expect any results. And you only want the table in the include file like noted above, but that … | |
Re: your var_dump is dumping post values so it will show the original posted values. your modified values are not in an array so you can't dump them as a group. theres to much going on in your script, you need to clean it up. start by checking first if the … | |
Re: well, wouldn't it be the same except you just hardcode the file path on your server. $attachment = chunk_split(base64_encode(file_get_contents('attachment/attachment.pdf'))); I knew I saw this some where. [url]http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php#attachment[/url] this explains how to send an automated email, a little mod and you should be good. | |
Re: ardav's first code snip is what you're looking for [CODE]if(isset($_POST['tid'])){ $tid = intval($_POST['tid']); $result = mysql_query("SELECT * FROM players WHERE tid='$tid'"); echo '<select name="players">'; while($row = mysql_fetch_array($result)) { echo '<option value='.$row['aid'].'>'.$row['aname'].'</option>'; } echo '</select>'; }[/CODE] if the tid isset then the select box will show or print, if not then … |
The End.