Jump to content

Porkie

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Porkie's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. i arent sure whether that will work because the code worked but now ive editted the form on this page to have a password field which will be pre set and if the password doesnt match up with the preset password then it will not post the comment otherwise it will. <!-- Send message to Twitter --> <?php if(isset($_POST['twitter_msg']) && !isset($error)){?> <div class="msg"><?php echo $twitter_status ?></div> <?php } else if(isset($error)){?> <div class="msg">Error: please insert a message!</div> <?php }?> <p><strong>What are you doing?</strong></p> <form action="insertTwitterMsg.php" method="post"> <input name="twitter_msg" type="text" id="twitter_msg" size="40" maxlength="140"/> [b]<input name="password type="text" id="password" size="10"[/b] <input type="submit" name="button" id="button" value="post" /> </form>
  2. Ive used a bit of a script to help me with being able to post messages from my website to my twitter. The problem is a only want certain people to be able to access it with a password field. So if they were to get the password and type it it then they could post but without the password they couldnt. So basically they type in there message and a password, if the password is correct then post is created otherwise error. Any help will be appreciated. <?php /* ---------------------------------------- */ // Change these parameters with your Twitter // user name and Twitter password. /* ---------------------------------------- */ $twitter_username ='yourTwitterUserName'; $twitter_psw ='yourTwitterPassword'; /* ---------------------------------------- */ /* Don't change the code belove /* ---------------------------------------- */ require('twitterAPI.php'); if(isset($_POST['twitter_msg'])){ $twitter_message=$_POST['twitter_msg']; if(strlen($twitter_message)<1){ $error=1; } else { $twitter_status=postToTwitter($twitter_username, $twitter_psw, $twitter_message); } } /* ---------------------------------------- */ ?> I have created the field on the form page. what would i need to do on this page to check the password field is correct before posting?
  3. i looked through and created a file like said on the link, where is the problem here? <?php header("Content-type: text/css; charset: UTF-8"); error_reporting(E_ALL); include('conn.php'); $sql = "SELECT * FROM fsdf_image"; $sql2 = mysql_query($sql); echo '<table><tr>'; while ($row = mysql_fetch_array($sql2)) { echo '<td>'; echo '<img src="/uploads/'.$row['image'].'/default.jpg"width=60" height="50" />'; } ?> error code
  4. the problem is a want to load multiple images from the database to show in the background behind my form <style type="text/css"> <!-- body { background-image: url(imagelocation); } --> </style> could i load multiple images using this function or would i need a different one? cheers
  5. i have a form which i want to be able to put pictures behind, how can i do this ?, Cheers in advance
  6. hey everytime i save this as a php file it shows up but it just writes everything out in plain text doesnt show any off the stuff it is meant to, am i missing something here? <?php header('Content-Type: application/rss+xml'); echo '<?xml version="1.0" ?>'; echo '<?rss version="2.0" ?>'; echo '<channel>'; // Opens our main content echo '<title>GetRecognized</title>'; // Defines the title of the RSS feed echo '<link>http://www.news.getrecognized.co.uk</link>'; // Where the RSS feed is from echo '<description>Latest News From Inside GetRecognized HQ</description>'; // What its about echo '<copyright>Copyright GetRecognized 2010</copyright>'; // copyright information echo '<language></language>'; echo '<image>'; echo '<title>GetRecognized</title>'; echo '<url>http://www.news.getrecognized.co.uk</url>'; echo '<link>http://www.news.getrecognized.co.uk</link>'; echo '<width>30</width>'; echo '<height>50</height>'; echo '</image>'; $c = mysqli_connect('','','', '') or die(mysqli_error($c)); // Connect with our information $q = mysqli_query($c, 'SELECT * FROM ORDER BY id DESC') or die(mysqli_error($c)); // Query the table for 5 news articles sorting by 'id' while($r = mysqli_fetch_assoc($q)) // While there is more rows to get (max of 5) we get an associative array { echo '<item>'; // Begin a news article echo '<title>'.$r['rsstitle'].'</title>'; // Give it a title echo '<link>'.$r['rsslink'].'</link>'; // The link to the article echo '<description>'.$r['rsssdescription'].'</description>'; // The description or content of the article echo '<author>'.$r['rssauthor'].'</author>'; // The author echo '<pubDate>'.$r['rssdate'].'</pubDate>'; // The date is was published echo '</item>'; // End news article } // End while statement echo '</channel>'; echo '</rss>'; /code]
  7. what is the easy way off doing this, as im trying to perform 5 queries on the same page? any help? cheers
  8. cheers still have a problem, this is my code $labourcount ="SELECT COUNT(Party) AS party_count FROM users WHERE party='Labour'"; echo 'Created On '.$row['party_count']; thanks
  9. $labourcount = "SELECT COUNT(Party) FROM users WHERE party='Labour'"; $result = mysql_query($labourcount); $row = mysql_fetch_array($result); echo 'Created On '.$row['result']; how can i output the result from this? sorry im just confused? thanks for help in advance
  10. i want to be able to create a searchbox which links in with wikipedia, so on my website a user would type in something to my search box then theyd click search and user would be forwarded to the search result on wikipedia any help with how id do it? cheers
  11. basically i want to be able to create an intercept between the link being pressed and the user going to google. Is it possible ? If so how would i go about it?
  12. ideas on how if i link is clicked to say 'www.google.co.uk' from my website, a page is shown before the user can see google webpage. is the way off doing this ? cheers
  13. cheers all its fixed now just a little bit more help please if i only want to show a page to users which had administrator status, where would i add the code? and what would it be? i would then need to echo the stuff for an admin and echo the error message if you dont have the admin status set.
  14. i have a database called genres, with and id field and a genre field in. My problem is on a different page i want to to show the data ive added in my genres database. is this the right code iam using or not because currently nothing is loaded =( <?php $sql1 = mysql_query("SELECT * FROM genres") or die(mysql_error()); echo mysql_num_rows($sql1); while($sql2 = mysql_fetch_array($sql1)) { echo "<option value='{$sql2['ID']}'>{$sql2['genre']}</option>"; } ?> </select></td></tr> cheers
  15. its all needed however i mean strip it down, such as are all the "echos" needed etc, or is there an easyier way off not having to write out all the "echos" .
×
×
  • 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.