Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Yes, you can, but not with AJAX alone. AJAX has to make a call to a script on your server to check/verify the information. Google has lots of example's/tutorials of how to do this: http://www.google.com/search?hl=en&q=ajax+php+login&aq=f&oq=&aqi=g10
  2. I do not think that 95% are using those, I just was not very clear, the etc means those versions plus the versions that came after, the point was that everyone on the web is "at least" using those. My bad for not making it clearer
  3. I am not sure if this is the case, but it could have something to do with headers etc. if you read up on headers you cannot have output of any kind (whitespaces etc) before header calls, if you do it ends the header right there and an error. Like I said, I am not sure if that is what is happening, but it sure sound like it and somewhere along the way there are headers trying to be sent or needing to be sent and that is preventing it thus causing the error...
  4. To go along with what AlexWD said, one way to do it is create a script that spits out an image. the gist of it, readfile the image into a string, after that unlink the imagefile then use php to send the right headers and display the image to the browser. So instead of <img src="image.jpg" /> It would be <img src="yourimagescript.php?name=imagename.jpg" /> If you need a better example let me know, I am bored enough to write some code.
  5. Does that matter? At least 95% of users online are using IE6, FF 1.x etc, all which can handle that data just fine. You are only leaving out 5% (As a high estimation), not a huge issue at all. If it bothers you, you can create a hash of the original address and store it in a database and just link the hash. So on the gotoPage.php?hash=asdfs34r52w023943204 it will be less than the 100 characters and it will still take people to the right address. Other than that, do not worry about the 5% and go for it.
  6. in png.php you need to call session_start, if you did I did not see it in the code you posted. You will also need to do that on the place where you post the re-captcha check. Verify those, if they are already done then write back and I will dig a little deeper.
  7. If your site is setup and is SEO friendly, plus the backlinks as suggested and has good content, it will take about 3-6 months for stuff to get a decent spot on Google Search. Page Rank does effect your search and how far up your results are. But yea, part of the key is having good content as well as adding good content continually. To really help though you need to do some leg work and find some free directories that you can add your link to and contact other websites and do some link exchanges with them to help boost your PR. I am no SEO expert, this is just what I have found from my expierence in working with websites and getting their results listed within the first 2 pages of a google search.
  8. <input name="lin" type="submit" value="hjkkjk" /> Fail to see how this is PHP, so moving to HTML. The gist, you were using button when it needs to be submit for it to submit a form.
  9. I believe you can get an API key and use Googles API, they shouldn't ban you from that as long as you are passing a valid API key to them using that functionality. http://code.google.com/apis/maps/documentation/
  10. $random = $_GET['a_id']; Remember to check/sanitize your data before using it in a query, as it can be SQL injected without doing so.
  11. As defined by google: In information technology, header refers to supplemental data placed at the beginning of a block of data being stored or transmitted. In data transmission, the data following the header are sometimes called the payload or body. So it is the initial data that is sent to the browser, after data is sent this initial block is locked, so you have to send all your headers before any output is sent to the client, because after that you are on the body of the document, thus it will cause an error. I hope that I explained it correctly, if not anyone can feel free to correct me.
  12. Something I was just thinking of, how often are you going to add a tag to the database? The reason I ask is that you could create another table with all the combinations in it, that way you have them all in a convient place to pull the data out easily and you only have to run this script once, or each time you add a new tag and update the database with the new combinations.... Just an idea.
  13. Ah, that makes more sense now lol! I think it can be handeled with recursion, but I am sure it is just as much of a hog as the 4 - foreach loops would be. I have never really been good with that stuff, so yea. I will leave it to be someone with more brain power to me to either provide a better example or say that is the best way to do it
  14. Ok, so now I am a little confused, does this not work? <?php $_SQL = "SELECT DISTINCT tag as split from rc_tags"; $result = $Connect->query("$_SQL"); if(!$Connect->query("$_SQL")) { echo $Error->ReportMsg("1",$Error->ReportError("1","","1","Tags","1")); } $tags = array(); while ($data = mysqli_fetch_array($result)) { //array_push($tags, $data['split']); $tags[] = $data['split']; } $result->close(); Close_Mysql(); foreach ($tags as $needles) { echo $needles . " - "; } ?> If you want them seperated onto seperate lines after x call that can be done using Modulus, will provide an example if that is what you are after. EDIT: mike beat me to it, but mine shows the mysql portion to build the array, so going ahead and posting.
  15. I think this is what you were getting at, I could be wrong but yea: <?php $_SQL = "SELECT type,tag as split from rc_tags Order By type"; $result = $Connect->query("$_SQL"); if(!$Connect->query("$_SQL")) { echo $Error->ReportMsg("1",$Error->ReportError("1","","1","Tags","1")); } $tags = array(); while ($data = mysqli_fetch_array($result)) { //array_push($tags, $data['split']); $tags[$data['type']][] = $data['split']; } $result->close(); Close_Mysql(); $x = 0; foreach ($tags as $type => $needles) { if ($type != $old_type) { $old_type = $type; $x++; echo "\n<br /> $x"; }else { echo " - $needles"; } } ?> Un-tested, but hopefully it simplifies things for you. EDIT: Added an order by to the SQL clause for the array organization.
  16. Can you post the code where you retrieve the data from the database and put them into arrays? That will help me grab my mind around what you are doing to help make this more efficient.
  17. Show us your MySQL statement, and I am sure we can help you design a better array Namely what will happen will be you create a multi-dimensional array, so you would use say the ID of the table row as the key then inside that key would have the attributes: $rArray = array(1 => array("name" => "Jack", "phone" => "555-555-5555"), 2 => array("name" => "Harold", "phone" => "666-666-6666")); Is a rough example of how the array would be setup then to access all information later you would do: foreach ($rArray as $item) { echo $item["name"] . " has a phone number of " . $item["phone"] . ".<br />"; } Hopefully that helps you get an idea of where this is going.
  18. Just ask them the recommended code to send email using PHP. Some hosts have a certain way for you to send emails and they can also tell you of issues with certain providers. I would contact them anyways and ask them for the proper method to send email using PHP using their host.
  19. It would not even go there for Hotmail and Yahoo, GMail tends to be more lienent so it should at least show up there. Posting the code will help us to see if maybe you have your mail function setup wrong, as it could be as simple as that Seeing your code, you may want to try adding some Mail Headers to your mail and see if that helps. Here are some common mail headers that may help (note not the CC/BCC but the Reply-To/From.) I would also look over the mail function at php.net as it does have some other items you can add such as under "Additional Parameters" etc. Finally, contact your webhost, see what headers they suggest sending with your mail, as that can help as well.
  20. Are you running on localhost or a hosted webserver? If localhost you need a mail server to send email from. You can, however, use GMail as your mail server if the localhost is the case, search google for phpGMailer for a script that will allow you to send emails using GMails server. Aside from that, if it is on a hosted webserver with a mail server it is getting filtered as spam, most email clients such as Hotmail GMail and Yahoo filter emails that come from sites as spam and this is not avoidable, unfortunately. The only way to fix it is if your hosted webserver fixes their IP address that sends the mail and make it show up on their MX record, as I believe that is how most of those email clients check if a message is "valid". Not 100% sure on the MX record IP, but that is what I have found with my own server.
  21. Never heard of it, I will have to look into that.
  22. Simply add a referencing ID as a foreign key in Table 2 to Table 1: Table 2: id, personid, pet Assuming that person identifies the first table correctly, change person to be part of table 1's actual name.
  23. As long as the first path is the same a simple update in phpMyAdmin will work using this SQL: UPDATE table_name SET column_name = CONCAT('http://www.blahblah.com', column_name) That should work, I have never done it so I could be wrong... I would do a test on one table element first by adding a WHERE clause to that so you do not screw up your whole table (or backup for table).
  24. It all depends on what data you want the RSS to contain. An RSS feed can pretty much be structured to whatever you want displayed, so it really depends on your data. I think the point of that deal is to help you understand how to structure an RSS feed with examples etc.
  25. Yea, I think that was what was in my head I just typed it up wrong. Thanks for correcting me though.
×
×
  • 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.