Jump to content

nade93

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by nade93

  1. Hi all i am wanting to have a pagintation similar to www.currys.co.uk or www.asos.com basically, the results are so many per page, then sorted by relevance, price etc can anyone point me in the direction of a tutorial please? thanks
  2. hi all, i am not sure if this is the right place for this, however i am looking to develop a payment system for an ecommerce style site that works in the following way: - user pays through the site (secure site) - payment then goes to sellers account for them to withdraw at any time. - effectively the money is held by our company until withdrawn by the seller Does anyone know where to start? what banks of payment systems offer this etc? thanks so much in advance
  3. of course!!!! so simple and missed it totally! legend thanks and for others visit this page for a few handy hints http://php.net/manual/en/function.mkdir.php
  4. Hi I am trying to set up a sytem that when a new user registers it automtically sets them up in a new folder on the server (i.e www.yourdomain.com/joebloggs) with a index file that will insert their details into a pre existing template. I can probably get the latter part, however I am struggling with the new folder creation section any ideas please?
  5. thanks used a similar priciple while ($row = mysql_fetch_assoc($result)) { $correct = $row['correct']; if ($correct == "answer1"){ echo "<item>"; echo "<question>".$row['quest'] ."</question>"; echo "<answer correct=\"y\">".$row['answer1']."</answer>"; echo "<answer>". $row['answer2']."</answer>"; echo "<answer>". $row['answer3'] ."</answer>"; echo "<answer>".$row['answer4'] ."</answer>"; echo "</item>"; } else if ($correct == "answer2"){ echo "<item>"; echo "<question>".$row['quest'] ."</question> <answer>".$row['answer1']."</answer> <answer correct=\"y\">". $row['answer2']."</answer> <answer>". $row['answer3'] ."</answer> <answer>".$row['answer4'] ."</answer> </item>"; } else if ($correct == "answer3"){ echo "<item>"; echo "<question>".$row['quest'] ."</question> <answer>".$row['answer1']."</answer> <answer>". $row['answer2']."</answer> <answer correct=\"y\">". $row['answer3']."</answer> <answer>".$row['answer4'] ."</answer> </item>"; } else if ($correct == "answer4"){ echo "<item>"; echo "<question>".$row['quest'] ."</question> <answer>".$row['answer1']."</answer> <answer>". $row['answer2']."</answer> <answer>". $row['answer3'] ."</answer> <answer correct=\"y\">".$row['answer4'] ."</answer> </item>"; } else{ echo "boo"; } }
  6. Hi All I am using php to take data from MYSQL to run a flash xml type of questionaire system however, I am having probelems with if and else for a certain thing ? while ($row = mysql_fetch_assoc($result)) { ?> <item> <question><? echo $row['quest']; ?></question> <answer><? echo $row['answer1']; ?></answer> <answer><? echo $row['answer2']; ?></answer> <answer><? echo $row['answer3']; ?></answer> <answer><? echo $row['answer4']; ?></answer> </item> <? } ?> the code aboveis fine, however i need and if $row correct = answer 4 then code looks like this ? while ($row = mysql_fetch_assoc($result)) { ?> <item> <question><? echo $row['quest']; ?></question> <answer><? echo $row['answer1']; ?></answer> <answer><? echo $row['answer2']; ?></answer> <answer><? echo $row['answer3']; ?></answer> <answer correct="y"><? echo $row['answer4']; ?></answer> </item> <? } ?> with the correct="y" in answer four field. any ideas, tried lots of different way cannot seem to get it
  7. hey thanks but this only changes the font, want to zoom in page as a whole. is there a way of doing this?
  8. managed to sort a solution!!! here it is incase anyone else needs it <?php // Connects to your Database include('../../lib/conn.php'); //This checks to see if there is a page number. If not, it will set it to page 1 if (!(isset($slideno))) { $slideno = 1; } //Here we count the number of results //Edit $data to be your query $data = mysql_query("SELECT * FROM module_ws_slides where mod_no='5'") or die(mysql_error()); $rows = mysql_num_rows($data); //This is the number of results displayed per page $page_rows = 1; //This tells us the page number of our last page $last = ceil($rows/$page_rows); //this makes sure the page number isn't below one, or more than our maximum pages if ($slideno < 1) { $slideno = 1; } elseif ($slideno > $last) { $slideno = $last; } //This sets the range to display in our query $max = 'limit ' .($slideno - 1) * $page_rows .',' .$page_rows; //This is your query again, the same one... the only difference is we add $max into it $data_p = mysql_query("SELECT * FROM module_ws_slides $max") or die(mysql_error()); //This is where you display your query results while($info = mysql_fetch_array( $data_p )) { Print $info['Name']; // First we check if we are on page one. If we are then we don't need a link to the previous page or the first page so we do nothing. If we aren't then we generate links to the first page, and to the previous page. if ($slideno == 1) { } else { $previous = $slideno-1; echo " <a href='{$_SERVER['PHP_SELF']}?slideno=$previous'> <img src=\"../img/layout/previous-arrow.png\" alt=\"previous slide\" border=\"0\" /></a> "; } //This does the same as above, only checking if we are on the last page, and then generating the Next and Last links if ($slideno == $last) { } else { $next = $slideno+1; echo " <a href='{$_SERVER['PHP_SELF']}?slideno=$next'><img src=\"../img/layout/next-arrow.png\" alt=\"next slide\" border=\"0\" /></a> "; } } ?>
  9. thank for the suggestion, however I cannot get this to work!
  10. Hi I am trying to work a simple arrow (left right) navigation and the arrows only appear if there is a slide to navigate to For example. THe page is set up to detect content based on the slides number. This is taken from the database. I am using the following code at present <a href="mod_one.php?slideno=<? echo $row['current_slide'] -1 ?>"><img src="../img/layout/previous-arrow.png" alt="previous slide" border="0" /></a> <a href="mod_one.php?slideno=<? echo $row['current_slide'] +1 ?>"><img src="../img/layout/next-arrow.png" alt="next slide" border="0" /></a>< I need something that only shows the arrow if there is a next slide in the database or a previous one. Please can anyone help?
  11. Hi All I am wanting to create a ull page zoom effect and not surewhich language would be best to develop this. Basically want to create a <a href> which will replicate the ctrl + or Ctrl - effect in all browsers. Can any one help me please? Thanks
  12. hey guys, sorry to bump but this is still not working is there a simpler way to do this? all i want to do is save the response (checked or unchecked) and refresh the page where it will relfect this, however information is not passing though correctly
  13. hi tematonic, ty for your reply, have tried this and fiddled around with it and non of them seem to work?
  14. basically one checkbox, if it is checked want it to pass the value "checked" when submit button clicked. If not checked want to pass value "off" when save button clicked
  15. Hi All I am using a single checkbox to control my audio on and off that i am using a form to process, however my fom will not process correctly. Basically, If checked i want the checkbox to save to the databased field (onoff) as 'checked' if the uncheck then click save i want to update the same database field with 'off' It seems like a relatively simple thing but cannot for the life of me get it right! can any one help pls? below is the code <? include('../lib/conn.php'); $query1 = "SELECT * FROM users_audio where userid='$userid'"; $onoff = $row['onoff']; $result = mysql_query($query1); while ($row = mysql_fetch_assoc($result)) { ?> <table> <tr class="css_sized_container"> <th><label for="css_sized_container"> <img src="../img/layout/sound.png" alt="audio icon" align="left" /></label></th> <td><form action="<? echo $PHP_SELF ; ?>" method="post" > <input type='checkbox' id="css_sized_container" name="checkbox" value="checked" <? if ($onoff=='checked'){echo "checked";} else if ($onoff==''){echo"";} ?> /> <input type="submit" name="submit" value="save" class="save" /> </form> <? } ?> <? include('../lib/conn.php'); if(isset($_POST['Submit'])&&($_POST['checkbox'])) { $ifchecked = $_REQUEST['checkbox']; mysql_query("UPDATE users_audio SET onoff='$ifchecked' WHERE userid='$userid'");} else { mysql_query("UPDATE users_audio SET onoff='off' WHERE userid='$userid'");} ?> thanks
  16. also i need something that passes the info through the checkboxes sorry to bump guys but getting no where fast with this!
  17. I am using sessions already to record whether the person is logged in or not and to record their activity while on here, how can i integrate this also?
  18. Hi All been battering my head against a wall with this so need some help if you can. I want to build a multiple choice quiz that has: 1. 10 questions 2. each question has 6 checkboxes they must choose from 3. there are three correct checkboxes and three incorrect 4. on submission, i want to be able to check if the right checkboxes are recorded then pass and save their score to a database and produce their results. I am running their questions from a database and works fine, its the correct and count and inserting score to database i am really struggling with. Can anyone please help? thanks in advance!
  19. hey sorry to bump but can any one help me out please? thanks
  20. how do i do it using ajax then as dont want to reload the page..... sorry just not very good with ajax..... well dont know any!
  21. thanks for the reply, however i want to do it all on the same page without using ajax
  22. Hi All I am trying to update a database when a checkbox has been checked without using a submit button Please find code below: <form action="<? echo $PHP_SELF ; ?>" method="post" > <input type='checkbox' id="css_sized_container" name="checkbox[".$row['onoff']."]" value='<? echo $row['onoff']; ?>' onclick='document.form".$row['onoff'].".submit();' /> </form> <? include('../lib/conn.php'); $ifchecked = $_REQUEST['checkbox']; mysql_query("UPDATE users_audio SET onoff='' WHERE userid='1'"); ?> basically, i want the user to check or uncheck the box, this be passed to the database then the checkbox remembers the answer for that user from the database (i.e. $row['onoff']; ) Any help would be amaing as very stuck!
  23. thanks guys will try both those suggestions! x
  24. have found this coding, if this means anything to anyone????? [attachment deleted by admin]
  25. Hi All my servers are with www.justhost.com and they use their own apache system. My files are all under the public html and they keep getting file injected to various parts of the site that will then be used as phishing sites. Once i remove these files, they are back up within an hour. I am using php contact forms with no captchas, I also have admin sections that ask for uploading to the sql, these are password protected though..... Can any one help e please as my account keeps getting suspended and I do not seem to be able to resolve thanks in advance
×
×
  • 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.