Jump to content

pgrevents

Members
  • Posts

    84
  • Joined

  • Last visited

    Never

Everything posted by pgrevents

  1. excellent you gave me something to work from thank you very much
  2. Thanks i tried it undefined offset in one is all it prints.
  3. How can I get an array from a text file that looks like 1: 10 Things You Need to Know About Losing Weight - 10 Things You Need to Know About Losing Weight, Signed, Factual,Science & Nature,Science & Technology,Sign Zone,TV, signed Available: Unknown Categories: Factual,Science & Nature,Science & Technology,Sign Zone,TV Channel: Signed Desc: Michael Mosley investigates the latest scientific breakthroughs in slimming. Duration: 3600 Episode: 10 Things You Need to Know About Losing Weight Firstbroadcast: signed: 2009-06-06T01:25:00+01:00 (4 days 12 hours ago) Index: 1 Lastbroadcast: signed: 2009-06-06T01:25:00+01:00 (4 days 12 hours ago) Longname: 10 Things You Need to Know About Losing Weight Modes: signed: flashhigh3,flashlow1,flashlow2,flashnormal,flashvhigh2,iphone,n95_wifi,subtitles Modesizes: signed: flashhigh3=350MB,flashlow1=352MB,flashlow2=352MB,flashnormal=225MB,flashvhigh2=659MB,iphone=227MB,n95_wifi=81MB Name: 10 Things You Need to Know About Losing Weight Pid: b00ksh7c Thumbnail: http://www.bbc.co.uk/iplayer/images/episode/b00ksh7c_150_84.jpg Timeadded: 1244638700 Type: tv Versions: signed Web: http://www.bbc.co.uk/programmes/b00ksh7c.html 2: 64 Zoo Lane - The Story of Herbert the Warthog, CBeebies, Children's,Entertainment & Comedy,Animation,TV, default Available: Unknown Categories: Children's,Entertainment & Comedy,Animation Channel: CBeebies Desc: Cartoon series about a girl who lives next door to a zoo. Lucy meets Herbert the Warthog, who tells her about his discovery of music on the savanna. Duration: 660 Episode: The Story of Herbert the Warthog Expiry: 2009-06-10T17:39:00Z Expiryrel: in 0 days 4 hours Firstbroadcast: default: 2007-09-14T09:00:00+01:00 (1 years 270 days 5 hours ago) Index: 2 Lastbroadcast: default: 2009-06-03T18:25:00+01:00 (6 days 19 hours ago) Longname: 64 Zoo Lane Modes: default: flashhigh3,flashlow1,flashlow2,flashnormal,flashvhigh2,iphone,n95_wifi,subtitles Modesizes: default: flashhigh3=64MB,flashlow1=64MB,flashlow2=64MB,flashnormal=41MB,flashvhigh2=121MB,iphone=42MB,n95_wifi=15MB Name: 64 Zoo Lane Pid: b00785fr Player: http://www.bbc.co.uk/iplayer/episode/b00785fr/64_Zoo_Lane_The_Story_of_Herbert_the_Warthog/?src=a_syn31 Thumbnail: http://node1.bbcimg.co.uk/iplayer/images/episode/b00785fr_150_84.jpg Timeadded: 1244638700 Type: tv Versions: default Web: http://www.bbc.co.uk/programmes/b00785fr.html this is an example as the files can contain more how can I get the following to print into something like this <?php //loop controller print "".$availiable." : ".$availiable_content.""; print "<br/>"; print "".$catagories." : ".$catagories_content.""; // SO ON ?> Is there any specific area to look at?
  4. so the while statement that i have doesnt pull everything from the database?
  5. http://www.barrybatemanphotography.co.uk/?id=155 now Im not the php programmer for the group im just a designer lol he is on holiday and this project has to be handed in like tommorow. as you will see from the above it displays 2 images but they are the same there are two images in the database and they are different but its looping with the while statement at the top of the page
  6. Does any one have any ideas? The latest entry is not showing ?????????? I cant find an answer an since its a messaging system it seems a little silly not showing the latest mail
  7. I do all my validation on the page i understand the security of the php file itself and stopping injections but its a small portfolio site and if spam becomes an issue I will implement that at a later date. I aint that strong at php so dont want to go down a route I dont know
  8. nevermind i forgot the auto increment on the new mysql database feel free to shoot
  9. The below code does not save to the database. Now this is the final stage of the deployment of the site and I only discovered this error when uploading to the website. On my testing server it works fine. But on the live server it prints an error and does not add to database. The site is run on mysql data from individual pages to image locations and all of those work except this insert statement uses the same connection?? Can anyone shed some light <?php // CONTACT FORM if(isset($_POST['submit'])){ // GRAB DATA $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; // SET DATE AND TIME $date = date('d/m/Y'); $time = date('h:i'); // FIRST SAVE TO DATABASE $dbhost = 'SERVERNAME'; $dbuser = 'DBUNAME'; $dbpass = 'DBPASS'; $dbname = 'DBNAME'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); if(mysql_query("INSERT INTO contact (name, email, message, time, date) VALUES ('$name', '$email', '$message', '$time', '$date')")){ // NOW MAIL $to = 'EMAIL ADDRESS'; $subject = 'New Message From Contact Form'; $body = "Massaged received at ".$time." on the ".$date."\n\n From: ".$name."\nEmail Address: ".$email."\n\n\nMessage;\n".$message.""; $headers = 'From: websiteaddress' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $body, $headers); //NOW REDIRECT USER header('Location:../?id=553&sent'); } else{ header('Location:../?id=553&error'); } } else { header('Location:../?id=553&error'); } ?>
  10. just remnants of something else i was doing i removed it since you saying that and still same outcome
  11. This works it displays the content BUT it will not show the last entry here is the DB code <?php $internal = $_GET['more']; $dbhost = 'localhost'; $dbuser = 'bates'; $dbpass = 'pass'; $dbname = 'bates'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); $query = mysql_query("SELECT * FROM contact WHERE internal= '$internal'"); $more = mysql_fetch_array($query); ?> here is my page display code <?php while($row=mysql_fetch_array($query, MYSQL_ASSOC)){ ; foreach ($row as $onbox)?> <div class="id_box"><?=$row['internal']?></div> <div class="from_box"><?=$row['name']?></div> <div class="from_email_box"><?=$row['email']?></div> <div class="msg_status_box"><?=$row['status']?></div> <div class="reply_status_box"> <a href="?more=<?=$row['internal']?>">more</a> </div> <div class="updated_box"> <? if(empty($row['reply_time'])){ print "".$row['time']." on ".$row['date'].""; } else{ print ""; } ?> what could be the reason that it wont show the latest entry?
  12. yeah i thought it the second might not have gone through but it is set in stone there thes is confudling me ???
  13. hi thanks, there wasnt a problem with the vars it does display correctly but instead of the 2 test images there is only one image being shown in the look. Saying that I did try your code but unfortunately it has the same result as before only showing one image thanks
  14. a big DOOH to me I used while in something yesterday but now its only showing one result i will keep working on it thanks peeps
  15. tried it it didnt work same result as before I am seeing 8 copies of 1 image when I am supposed to be seeing 2 different images thanks
  16. I dont understand the problem as it is a loop. I have two sets of image information so thats two images. I have set up a for each loop so that I can display these images as a thumbnail here is the loop statement <?php foreach($gallery as $image) : ?> <li> <a class="thumb" href="<?=$imageloc?>" title="Title #0"> <img src="<?=$imagethumb?>" alt="Title #0" /></a> <div id="clear"></div> <div class="caption"> <div class="image-title"><?=$imagename?></div> <div class="image-desc">see larger</div> </div> </li> <?php endforeach ; ?> ?> now it does display but as I said I have only two images to show but it returns 8 loops of the same first image. Here is the code php mysql code that i include <?php $dbhost = 'localhost'; $dbuser = 'dbuser'; $dbpass = 'dbpass'; $dbname = 'dbname'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname); $query = mysql_query("SELECT * FROM gallery"); $gallery = mysql_fetch_array($query); $imageloc = $gallery['image_loc']; $imagename = $gallery['image_name']; $imagethumb = $gallery['thumnail_loc']; ?> There is no errors outputting so I am at a loss can any of you help?
  17. scrap that figured it out myself seems there was a typo thanks
  18. Sure. This is the one I have been trying to make work but it isnt how I want it too <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /web.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ web.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /web.php </IfModule>
  19. I am using codeigniter as my php frameworks and the initial file is web.php in the main directory. I have tried the examples for mod rewrite but its not what I am trying to achieve. instead of http://www.website.com/web.php/ / i am looking for the mod_rewrite to do this http://www.website.com/ how would I go about this ps: extensive google work already done lol thanks
  20. i found it wrong letter changed it it now works. thanks for your help
  21. true just checked my spelling on the update activation it was wrong changed that now that works but update user_name i will have another bash
  22. see i thought that but its in an if statement that checks to see if there is a row with those details there. i have tested it with values in the table and values that arent in the table and the if statement works which leads me to think that the details in the update are correct
  23. i used your code and got a print out of the variables i am trying to pass output; Affected rows for 37e48acbb43dda0568b8867381227f12 - testusername - testemail Affected rows for Activation 37e48acbb43dda0568b8867381227f12 - testemail ps i am not a programmer by any sorts just trying to do what i can
  24. Sure What is happening is users who have signed up get an activation email they click on the link and the link brings them to this page. Now the script grabs the data from the url and then checks if it is an actual actual code. That is where the first SELECT query is used. If there is a code then i want it to update the user_name and set active to yes (plays part of the login script) and sets activation table to yes so if a user trys to activate again then the user is taken to a page that says already activated etc (not done that part yet) So I am trying to update 2 tables
  25. dont quite understand that but changed update to select on both querys and still no change ???
×
×
  • 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.