Jump to content

fusionpixel

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Everything posted by fusionpixel

  1. @chronister I think we both are in the same boat here, I am familiar with all the terms you describe and I can do either cookies/sesion/database sessions but more than suggestions on what to do I was looking more on what is the best method. since I can defenatelly apply any of them I just need conformation from an expert on what is the perfect solution. Thanks again for your comments @phpdragon Thanks for the link! Anyone else who might have some tips are welcome
  2. What is the best way to handle security in regards to CreditCard transactions? My form does 5 steps 1. Show form (validate JS) 2. Validate (PHP) 3. Confirm by client 4. Send to gateway 5. Receive response from gateway My concern is step 2-4 because some how I need to have access to sensitive information (creditcard, exp date) while the user confirms from page to page before sending to the gateway. Any ideas? of course hidden fields are out of the question.
  3. So you would add more fields instead of more rows in a different table? not sure if that is practical unless I am missing something important here
  4. because the whole row gets dumped to the user in a textarea where the user edits everything there. While it works I am thinking of creating a more elegant solution where the user can order each qa/add/delete/publish which I started with its own table...
  5. I am creating a basic CMS and everything is working flawlesly but there is a new catch. One of the sections of the CMS will be a QA section where the user will be able to add/edit/delete basic QA section. for example something like this would be rendered on the HTML Q: blah? A: ander to blah I have the QA inside a single cell and I know it is awful so I am debating what would be the best way to handle this. My first thought is to create a table and add the Q and A rows as necessesary but keeping it independent from the whole QA. but I am sure there is a more elegant way to handle this. Of course I don't want to fix what is not broken but I really want to improve what is already fixed. TIA.
  6. haha! Are you kidding me? one small insignificant error without first testing. that is great!
  7. One last comment, on this line while ($row = mysql_fetch_assoc('$result')) it should be while ($row = mysql_fetch_assoc($result)) Thanks again...
  8. Ah! Yeah that makes sense and seems logical enough for me.... Thanks so much I really appreciate it.
  9. Ah good point... the reason why I need the first query is this [GROUP TITLE] -child element -child element -child element [GROUP TITLE] -child element -child element -child element -child element -child element [GROUP TITLE] -child element -child element -child element without the first query I would get this: -child element -child element -child element -child element -child element -child element -child element -child element -child element -child element -child element Thanks for your help and your suggestions...
  10. Right, and that is why I am looking for help since I dont know exactly how to combine them. At least I dont know of any specific logical way to do it. This is what happens.. 1. get list of groups 2. with the first group loop inside the first group and any item that matches the group name from the first table show it 3. loop I am thinking that I could save the info in an array and then access it through there.... but only hitting the database once per table.
  11. Hi all, I have the following loops that work as expected: $firstQuery = " SELECT bgroup.group FROM bgroup"; $firstResult = mysql_query ( $firstQuery ) or die ( mysql_error() ); while( $firstRow = mysql_fetch_array( $firstResult )) { echo "<h2>". $firstRow['group']." </h2><br />"; $query = " SELECT bmarks.name, bmarks.group, bmarks.address FROM bmarks LEFT JOIN ( bgroup) ON (bgroup.group = '".$firstRow['group']."' ) WHERE bmarks.group = bgroup.group ORDER BY bgroup.group"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo "<a href=\"" .$row['address'] ."\" target=\"_blank\">". $row["name"]. "</a>"; echo "<br />"; } } But I am a much better way to do this rather than having to query the database everytime the first loop kicks in. I have a small database at the moment but I cant imagine how much overload it would be with couple of hundred of items in the DB. My DB consists of 2 tables bmarks table contains all the bookmarks (address/description/info) bgroup table contains a list of groups that beling to the bmark table Thanks
  12. Thanks for the confirmation and the idea to use a DB to add the information.
  13. If I add my Keywords and Metatags on the fly with a PHP include, would that breat any search engines from reading them? Me says not but not 100%sure TIA
  14. Humm, that seems interesting. I am familiar with regexp and will look more into that. At least with the reading I have made to the site you point me out to I have adjusted my template from <? echo header(); ?> to <?=$header;?> it think it will be easier for people to remember just to type <?=$header;?> but we will see. I will look into how to replace the {} for actual content. THX
  15. I am creating a simple site that will be edited by several people and I would like to set up a simple sistem similar to what templates use {header} instead of header() I was looking at some template solutions but they are too big for what I am trying to acomplish. so in short I was wondering what is the best way to convert header() into {header}. Is there any simplified way to do it? TIA
  16. I dont think there is a "perfect" way to do it. What I would do in your case is look for some one who has already created something similar and that their code is stable to study it, and go from there. Of course they might be issues or concerns about security and such but its best to start somewhere.
  17. Ah! I dont think that I "missed" your point, I think you didn't say you wanted to show how many times people have clicked on your links ;) It shouldnt be hard to do. For what I see in the code you posted you are pulling information from a database. I would just add a new row to the database that will hold how many times people have clicked on each link. Then it is up to you how you want to track the clicks, you can place the information directly on each form loop like gallery.php?id=5 (or whatever id your link is). Then on the gallery.php page you can grab the id and add 1 more click to your database for that specific link. Now back to your main page you just add a piece of code like: {$row[ 'titill' ]} - {$row[ 'date' ]} - 'clicks('. {$row['clicks']} hows that, better?
  18. You could do this with JavaScript/Ajax solution that way you dont have to refresh your browser but the results happen instantaneously.
  19. I dont know any specific tutorials but maybe to make it easier on your system I would work on gallery.php and record when some one visits that page and where they are coming from. So eventually you not only will get details of when some one looks to any of your links but also if some one bookmakrs your site and they come back to that specific page. Could I do it? of course! Could I write a tutorial to do that specific task? maybe :) but if you get the idea there is no need for a tutorial! Does that help?
  20. Nice, I can't believe it. so close yet so far. I tried to read books and the PHP manual to figure this out but still for some reason I couldn't figure it out. Thanks for the tip, it works like a charm.
  21. I am trying to create a function that will check if a Constant has been defined. one way to do it is: [code]#define Constant: define('FIRST_NAME', 'Fusion Pixel');[/code] [code]if ( defined('FIRST_NAME')  ) { echo FIRST_NAME; }[/code] But I need a function to call it through the code: [code]function checkConstant() { if ( defined('FIRST_NAME')  ) { echo FIRST_NAME; } } #now call the function checkConstant(); [/code] But the problem is that if I have different constants that I need to check it would be nice to have a function that I can pass the function to without having  to rely on one function at the time. Something like [code]checkConstant(MY_CONSTANT);[/code] But it doesn't work: [code]function checkConstant($theConstant) { if ( defined($theConstant)  ) { echo FIRST_NAME; } }[/code] The function above failes silently. Any ideas?
  22. probably you are getting the undefines because there are functions runing before the variables needed they are loaded. have you considered a "loader" file rather than an array? <? #file holder name holder.php include ('file1.php'); include ('file2.php'); .... ?> then on your actual file include ('holder.php'); Now, i havent tested this so I dont know if it will work.
  23. [!--quoteo(post=355841:date=Mar 17 2006, 12:01 AM:name=ramki)--][div class=\'quotetop\']QUOTE(ramki @ Mar 17 2006, 12:01 AM) [snapback]355841[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi guys, i've a combo box and the value or the item changed in it should be passed to another form.their r no buttons.how do i do that?? [/quote] use the behavior.. onChange.
  24. Good morning... this works for me: [code] <style type="text/css"> #menu {position:relative; top:10px; left:100px; width:75px; background-color:#fff; z-index:100;} #menu a.p1, #menu a.p1:visited {display:block; width:75px; height:75px; text-decoration:none; background:#fff; top:0; left:0; border:0;} #menu a img {border:0;} #menu a.p1:hover {text-decoration:none; background-color:#8c97a3; color:#000;} #menu a .large {display:block; position:absolute; width:1px; height:1px; border:0px; top:-1px; left:-1px;} #menu a.p1:hover .large {display:block; position:absolute; top:-60px; left:150px; width:300px; height:300px; border:10px solid #fff;} #info {z-index:100; height:10em;} </style> </head> <body> <? echo "<!-- looking for image: $filename -->\n";        echo '<div id="menu">'; echo '<a class="p1" href="#nogo" ><img src=\"$filename\" /><img class="large"  src=\"$filename\" /></a>'; echo '</div>'; ?> </body> </html>[/code] now its my turn :) Yawn! nite...
  25. [!--quoteo(post=355658:date=Mar 16 2006, 02:26 PM:name=theycallmepj)--][div class=\'quotetop\']QUOTE(theycallmepj @ Mar 16 2006, 02:26 PM) [snapback]355658[/snapback][/div][div class=\'quotemain\'][!--quotec--] Is there a short php script that can look at the date of when a directory was last edited? On our website, we have a home-made type photo gallery, and I want to be able to have the text "NEW" next to our photo gallery link every time new pictures are put in, and I want that link to be there for at least 5 days. I figure that a script that checks the date on a directory would be a good start. [/quote] Maybe a wild idea, but how about using php to pick up the names of the files and the dates they were modified within the directory. If a file is older than 5 days don't display the "NEW" icon (or text).
×
×
  • 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.