Jump to content

gazza52

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by gazza52

  1. Hi Guys, I am wanting to include an api into my website to show amazon products, customer reviews etc. I am new to this and am struggling to find a tutorial which helps as they are all very complex. Can you assist. Ta Gary
  2. I understand how this would work for comparing one article but what about if I wanted to have 3 articles in there? It wouldnt work as the ID would be 1/2/3 etc for article 1 with changes made and then 4/5/6 for article 2 so when comparing say article 1 I would have article 2 in there aswell.
  3. I am new to PHP so please forgive me lol. My understanding is I will have a table called articles Article ID/Article Title/Contents/Date Added If i inserted this table in I can obviously have my article in but if I amended it it will delete the previous contents. How do i ammend contents so the previous contents are stored and the version saved?
  4. Hi, Ok I see what you are saying but struggling to know what I need to put into my code to make this possible? Thanks
  5. Hi, thanks for your reply. As its only one article I would be comparing the versions for would it be adviseable to have just one table with different versions of the article and then compare the date it was added so this would then show different versions of edit of the document. I would also tho like to roll back to a previous version of the article I dont think the above method would help?
  6. Hi All, I'm trying to produce a very basic Wiki like feature where you can view an article and then click on say a history link and view the recent changes which have taken place and also roll back to old articles. These articles will simply be Mysql record entries. Please can you assist as I am struggling to find examples of this? Thanks Gary
  7. gazza52

    RSS

    Hi All, I am wanting to show an external RSS feed link on my website but am new to PHP and experiencing problems doing it. Please can someone provide a tutorial link or some basic code to help? Thanks Gary
  8. Hi All, I'm trying to incorporate a BBC Sport RSS Feed into my website. The following code will show me the news feeds as text and I can include the url's as text also but want to turn this into a clickable url. How do I do this, I cant work it? please help. $feed_url = "http://newsrss.bbc.co.uk/rss/sportonline_uk_edition/football/teams/s/shrewsbury/rss.xml"; // Get data from feed file $response = file_get_contents($feed_url); // Insert XML into structure $xml = simplexml_load_string($response); // Browse structure foreach($xml->channel->item as $one_item) echo $one_item->title."<BR>";
  9. gazza52

    Forum

    Hi, I'm looking for a tutorial or downloadable code which I can use to create a forum/guestbook. I want to be able to have an admin section where you can delete posts edit etc. Thanks Gary
  10. Hi All, I'm new to sending e-mail via PHP and am having a few probs. I am running Apache on a Win Vista on a laptop so no server. I have a simple form which I want to be able to put in values Name, E-mail address and comments. The e-mail address entered is then used to send the name and comments over to the entered address. Now to the problem, I dont have a means of sending this e-mail so I installed soft talk mail server and configured a local domain of localhost.com, and linked this to my pop 3 mail account to provide e-mail access. I then configured the php.ini TO SMTP = localhost.com and sendmail_from as user@localhost.com where user is a user configured in the mail server. This setup does not appear to work, please advise or any links which talk you through this process. Thanks Gay
  11. Thats a good idea thanks. If I reserved the item so I would have a reserved table in the database with the following. Username, Name e-mail, item code, item name. They cannot however set a qty just request an e-mail when stock back in. What I would like to do then is say when stock is back in the reserved table is checked and items which are back in an e-mail sent to customer to say back in stock and reserver deleted. Thanks Gary
  12. Hi, I am looking to do an e-commerce which has a catalogue of items. When the stock runs out the item is shown as out of stock but I would like the option for the user to be able to back order this and then added to a table as backorders and an e-mail sent to notify this need ordering.
  13. gazza52

    Commerce

    Hi All, I am looking to build a PHP website which sells DVD's for my dissertation. There will be a customer login and an admin section. What I would like to do is when the admin logs in they have a screen come up showing them what is currently low on stock and the option to order more. When the admin staff click order more they are prompted to enter a qty which updates the mysql db and sends an e-mail to a specific address saying please send the entered qty of the required item. I have never done this before and any help or example code would be a great help. Many Thanks Gary
  14. Hi All, Hopefully a simple one. I have hyperlinks in my webpage which are set to display in a paragraph which is controlled in a css sheet. The paragraph is set to have white text. If I have used this hyperlink before it will change the text from white to a purple blue. My problem here is that I have different style backgrounds for CSS so is resulting in some links not being visable. What is the script for defining my visited links to keep white text? Thanks
  15. Hi Sasa, Sounds good to me. Will let you know if it works later :-). Gary
  16. Please can anyone help me. ??? :'(
  17. To make it easier I have put in a button instead which is called delete. What should I assign to the delete button to get it to pass the correct details to add.php to get it to delete the specific id field?
  18. I have now managed to get a checkbox for each item. I have put a single field in which is called Delete item. What I need to do now is say when I click delete item the checkbox which is ticked is deleted along with its row. The delete item should call the add.php script contains something like: if ($_POST['delme']) { unset (session [basket][$item]; --$item is the id field } What I do not understand is what I would send to add.php and if the code above is correct? Thanks for your help.
  19. Can anyone help me with this. I have now managed to add a radio button under a field called delte and a record number for each item that is added to the basket. The record number will start from 0 and go up. To test the record number I have created a button which deletes a certain record number row and this works. What I am struggling with is how to delete a certain row if its radio button is checked with one single delete button. ???
  20. I understand where you are coming from but can you help me with the coding?. Thanks again,
  21. Hi, I have developed a search which connects to a mysql database. From these results I have added them to a table which has an option to add the items to a shopping basket. When you go to the shopping basket the added items are shown. I have added an option to empty the basket. What I am having problems with is deleting single items from the table. My code for the shopping basket is: <? session_start(); if (!isset($_SESSION["loggedIn"])) { include ("login.php"); exit; } if (!isset($_SESSION["basketcount"])) { $items=0; } else { $items= $_SESSION["basketcount"]; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE> Shrewsbury Town FC </TITLE> <? IF (ISSET($_COOKIE["selectedStyle"])) // if style has been set { $style=$_COOKIE["selectedStyle"]; } ELSE // if style not yet set, default to 0 { $style="Master"; } ?> <LINK rel="stylesheet" href="style<?= $style; ?>.css"> </HEAD> <BODY> <DIV id="header"> <IMG src="mlogo.jpg"alt="Shrewsbury Town Unofficial Logo"> </DIV> <DIV id="date"> <? PRINT date("l M dS, Y",time()); PRINT "<br>"; PRINT date ("H:i",time()); ?> </DIV> <DIV id="basket"> <? ECHO "You have $items<br>"; ECHO "items in your basket<br>"; ECHO"<a href=\"basket.php\">View Basket</a>"; ?> </DIV> <H1>Shopping Basket</H1> <DIV id="navigation"> <UL> <LI> <A href="index.php">Home</A></LI> <LI> <A href="history.php">Club History</A></LI> <LI> <A href="clubshop.php">Club Shop</A></LI> <LI> <A href="F&R.php">Fixtures & Results</A></LI> <LI> <A href="prostar.php">Prostar Stadium</A></LI> <LI> <A href="account.php">My Account</A></LI> <LI> <A href="feedback.php">Feedback</A></LI> <LI> <A href="logout.php">Logout</A></LI> </UL> </DIV> <DIV id="resultstable"> <table align="center" border="1" cellpadding="5" cellspacing="0"> <tr> <td width="500"><b>Item Selected</b></td> <td width="100"><b>Remove Item</b></td> </tr> <? if (isset($_SESSION["basket"])) { foreach ($_SESSION["basket"] as $item) { print ("<tr>"); print ("<td>$item</td>"); print ("<td>Remove</a></td>"); print ("<tr>"); } } ?> </table> <A href="add.php?empty=true">Empty the basket</A> </DIV> </BODY> </HTML> The add.php is a script which allows me to add and remove items. The code for this is shown below: <? session_start(); IF (!ISSET($_SESSION["loggedIn"])) { INCLUDE ("login.php"); EXIT; } IF (!ISSET($_SESSION["basketcount"])) { $items=0; } ELSE { $items= $_SESSION["basketcount"]; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <TITLE> Shrewsbury Town FC </TITLE> <? IF (ISSET($_COOKIE["selectedStyle"])) // if style has been set { $style=$_COOKIE["selectedStyle"]; } ELSE // if style not yet set, default to 0 { $style="Master"; } ?> <LINK rel="stylesheet" href="style<?= $style; ?>.css"> </HEAD> <BODY> <DIV id="header"> <IMG src="mlogo.jpg"alt="Shrewsbury Town Unofficial Logo"> </DIV> <DIV id="date"> <? PRINT date("l M dS, Y",time()); PRINT "<br>"; PRINT date ("H:i",time()); ?> </DIV> <DIV id="basket"> <? ECHO "You have $items<br>"; ECHO "items in your basket<br>"; ECHO"<a href=\"basket.php\">View Basket</a>"; ?> </DIV> <H1>Online Club Shop</H1> <DIV id="navigation"> <UL> <LI> <A href="index.php">Home</A></LI> <LI> <A href="history.php">Club History</A></LI> <LI> <A href="clubshop.php">Club Shop</A></LI> <LI> <A href="F&R.php">Fixtures & Results</A></LI> <LI> <A href="prostar.php">Prostar Stadium</A></LI> <LI> <A href="account.php">My Account</A></LI> <LI> <A href="feedback.php">Feedback</A></LI> <LI> <A href="logout.php">Logout</A></LI> </UL> </DIV> <DIV id="resultstable"> <? if (isset($_GET["add"])) { $_SESSION["basket"][]=$_GET["add"]; if (isset($_GET["add"])) $_SESSION["basketcount"] = $items; $_SESSION["basketcount"] = $_SESSION["basketcount"] + 1; header ("location:http://mi-linux.wlv.ac.uk/~0525154/clubshop.php"); } if (isset($_GET["empty"])) { unset($_SESSION["basket"]); $_SESSION["basketcount"] = 0; header ("location:http://mi-linux.wlv.ac.uk/~0525154/basket.php"); } ?> <a href="basket.php">View Basket</a> <p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a> </p> </div> </body> </html> Please advise on code which will allow me to delete single items from the basket. Thanks
  22. I am looking for some basic code which allows me to delete a single row from an array. Please help
×
×
  • 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.