Need Some Code, Dont Know Where To Get It

Pages: 1, 2, 3
free web hosting

Read Latest Entries..: (Post #22) by shadowx on Aug 26 2006, 11:28 AM. (Line Breaks Removed)
Ahh just saw it, it looks really good, i like the skin on it. Looks professional Hope it helps you out in the future
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Need Some Code, Dont Know Where To Get It

Bkag
Ok on my rc forum for the track directory what i would like is a code to take the post and transfer it to this page www.rc-forum.co.uk/portal.php

If that is not possable i would like to make a code similar to trap17s code for free webhosting request form, but i have no idea on how to do this, are there and mods or addons already able to do this?

Reply

lemonwonder
I dont really understand on what u are asking

BTW: That is really wide, its double the width of my screen! Change the width man lol

Reply

gaea
Could you please be a little more specific?

What I *think* you mean (and I could be wrong, if so please correct me) is that you want the contents of http://www.rc-forum.co.uk/viewforum.php?f=14 to show up on http://www.rc-forum.co.uk/portal.php. If this is the case why don't you just use a script to foward portal.php to the other page? There are a bunch of ways to do this (javascript, php, etc). The method I'd recomend is the php version (as not everyone has javascript enabled, and php is serverside). It is really simple. Just make the page a php file, and use this code:
CODE
<?php
header( 'Location: http://www.yoursite.com/new_page.html' );
?>


Alternatively you could use an Iframe of the origonal page inside the portal.php page.

As far as the trap17 free hosting request form goes, do you mean the one that appears when you click the "Let's Get Started" button on http://www.forum500.com/req_form.php?siten...p;introname=new ? If so, that's quite simple to make. If you give me the info you want collected, and the way you want it to be formatted I'd be happy to help you write it.

 

 

 


Reply

Bkag
Ok here is what i want, i want it to take the posts off of http://www.rc-forum.co.uk/viewforum.php?f=14 then take that information and put it on http://www.rc-forum.co.uk/portal.php in alphibetical order with just the title of the post which is a link to the text ripped off the post on http://www.rc-forum.co.uk/viewforum.php?f=14
Eg.

http://www.rc-forum.co.uk/viewforum.php?f=14

Title of post = Example city, Example track title

Content of post = This is description Blah blah blah blah

[/quote]-----------------------------------------------------------------------------------------------
QUOTE



http://www.rc-forum.co.uk/blank.php


Search box


Example city, example track title

-----------------------------------------------------------------------------------------------
QUOTE


(Clicking Example city, example track title takes us to the following)

This is description Blah blah blah blah



-----------------------------------------------------------------------------------------------[quote]


Does that explain things more clearly?

Reply

hype
He's saying that he wanted the lastest post in that particular forum to show up in his portal homepage with the topic title and post... You got get some portal addons from the phpBB mods & hacks page, which could work well with your board...

Reply

Bkag
Well not realy basicly i want it to convert posts and add it to the "track directory" which i named portal.php

Reply

Bkag
Well i have kindof diched the elaborite idea of moving the posts to a directory but i would like to do a form similar to trap17s free web hosting application form, could somone guide me on how to go about this?

Reply

farsiscript
hi dear Bkag plz change your sig image , you posting very large i think you want show your post in forum at your portal ?
if you want do that you must make one portal and login at forum database and then read post info and echo at your portal

Reply

Bkag
Ok i did that with my signature by accident fixed now smile.gif Anyway what i wanted to do is for the posts to be taken to what used to be portal.php and now is www.rc-forum.co.uk/blank.php but i have diched that idea now and what i want now is to make a form similar to the trap 17 free webhosting request form but i dont know how to go about it. Is there a generator or somthing because i realy dont know how to code it.

Reply

shadowx
Hi, Do you mean you want a form like the hosting application with different text boxes eg:

QUOTE

Name [________]
Location [_________]
etc
etc
etc


And you want that to automatically be converted into something like:

QUOTE

My name is "shadow-x"
I live in "England"

is that what you want?


Reply

Latest Entries

shadowx
Ahh just saw it, it looks really good, i like the skin on it. Looks professional smile.gif

Hope it helps you out in the future smile.gif

Reply

Bkag
Yeah that was when the mysql was down yesterday it is working now

Reply

shadowx
Glad to hear it! the only problem is this error message i just got:

QUOTE

phpBB : Critical Error

Could not connect to the database


unless youve put a wrong link in or something, seems strange to me. Maybe swl is experienceing troubles ill try again later. You might find an addon for your forum but i wouldnt know how to find it, sorry!

Glad to hear it was working though, ill check again abit later to see if its just a server problem!

Reply

Bkag
Thank you shadow so much you can see it implemented at http://www.rc-forum.co.uk/rcdirectory.php it turned out great, now i need to find a way to have it go into a post!

Reply

shadowx
Strange i ran the code you had, both the html and php and it worked fine, are you sure you didnt accidentally put the COUNTY value into the COUNTRY box and thats what made it look weird? Thats what i done the first time.

after running it i noticed one problem with the website address, unless it was something like "http://site.com" the link made would act like a directory. So if someone put the website as "www.website.com" the link created would be "http://rc-forum.co.uk/www.website.com" and obviously that wouldnt work so ive added a little bit of code to look for "http://" and insert it if its not already there.

try this code it should work, it did for me

CODE

[b]PHP[/b]


<?

// this page proccesses the information from the information form and gives an output which the user will see.

//first get and set variables from POST

$streetaddr = stripslashes($_POST['streetaddr']);
$trackname = stripslashes($_POST['trackname']);
$town = stripslashes($_POST['town']);
$county = stripslashes($_POST['county']);
$country = stripslashes($_POST['country']);
$postal = stripslashes($_POST['postal']);
$preemail = stripslashes($_POST['email']);
$email= str_replace('@', '@', $preemail);
//stops spambots finding email address and spamming the address
$website = $_POST['website'];
$description = $_POST['description'];

// got variables so do something with them. make an output for the user as a html document

//but first check if there is a website for this track
if($website == NULL || $website == "http://") {
$web = "There is no official website for this track at the moment.";
} else {
$web="This track also has an official website located at:";
}
//Now we can tell the user if the website exsists before we try to give them a URL

/////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                      ///
//got to check for propper URL or it could find an invalid page or link back into our own directories!///
$http = strpos($website, "http://");
if($http == NULL) {
  //dodgy wedsite URL, We gotta fix it.
  $website = "http://$website";
};
//now the url is good so we can carry on                                                              ///
//                                                                                                    ///
/////////////////////////////////////////////////////////////////////////////////////////////////////////

$html = "<HTML><HEAD><TITLE>RC Track Information For $trackname</TITLE></HEAD>
<BODY>
<!-- again colours and layout can be easilly changed! -->
<BR><p align=center><h4><U>$town, $county, $trackname</h4></u></p>
<BR>
<B><U>Track location details</B></U>
<BR>
<p align=left>
This track is located at $streetaddr in $town, $county, $country, $postal.<BR><BR>
<B><U>Track contact details</B></U><BR><BR>
The track email address for primary contact is: $email<BR><BR>
$web <a href=$website target=new_window>$website</a>
<BR><BR>
<B><U>Track description</B></U><BR><BR>
<HR>
<PRE>
$description
</PRE>
<HR>
</p>
</body>
</HTML>
";

echo $html;

?>


[b]HTML[/b]

<HTML>
<HEAD>

<TITLE>
RC Track Information Form
</TITLE>
</HEAD>
<BODY>


<!-- This is very plain and boring but you can easilly change the layout and colours, if you need help im sure I can give it and so can many other people at Trap17 :-) -->

<TR><TD><BR></td></tr>

<form action=submittrackdirectory.php method=POST> <!-- submit.php can be changed to a different name if you need to. -->

<table border=0 cellpadding=0 rows=35%> <!-- for alignment purposes-->
<TR><TD><BR></td></tr>
<TR><TD>Name of Track:</td><td> <input type=text size=70 name=trackname align=center></td>
<TR><TD><BR></td></tr>
<TR><TD><b><u> Track Address </u></b></TR></TD>
<TR><TD><BR></td></tr>
<TR><TD>Street Address (First line only):</td><td> <input type=text size=100 name=streetaddr></td></tr>
<TR><TD><BR></td></tr>
<TR><TD>Town:</td><TD> <input type=text size=40 name=town></td><tr>
<TR><TD><BR></td></tr>
<TR><TD>County:</td><td><input type=text size=40 name=county></td><tr>
<TR><TD><BR></td></tr>
<TR><TD>Country:</td><td><input type=text size=40 name=country></td></tr>
<TR><TD><BR></td></tr>
<TR><TD>Postal/ZIP Code:</td><TD><input type=text size=15 name=postal></td></tr>
<TR><TD><BR></td></tr>
<TR><TD><BR><B><U>Contact Details</b></u></td></tr>
<TR><TD><BR></td></tr>
<TR><TD>Track Email address:</td><td><input type=text size=40 name=email></td></tr>
<TR><TD><BR></td></tr>
<TR><TD>Track Website:</td><td><input type=text size=40 name=website value="http://"></td></tr>
<TR><TD><BR></td></tr>
<TR><TD><B><U>Track Description</B></U></td></tr>
<TR><TD><BR></td></tr>
<TR><TD>Description:</td><TD><textarea rows=10 cols=60 name="description"></textarea></tr>
</table>
<BR><BR>
<p align=center><input type=submit value="Submit"></form></p>



The php and HTML you added seems fine to me!

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2, 3
Similar Topics

Keywords : code

  1. How do you test your php code - (80)
    We know that php is a server side scripting language. So we will need a server with the php parser
    to parse/test our code. How are you doing that. Do you upload it to a server for testing or did you
    instal php and the server (apache) on your computer (localhost)...
  2. Html Code Tester. Online Script - (15)
    Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
    this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
    Current script: CODE <?php //Save this as something like htmltest.php function
    CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user
    input $html_safe=str_replace("<?php"," ",$html_unsafe);
    //Starts security measures $html_safe=str_replace("?>","
    ",$html_sa...
  3. Wap Source Code Viewer - Mobile/wap source code viewer page (4)
    This is a source code viewer that will workl on wap/mobile sites but you can easily convert it to
    work on web im sure ;-) CODE <? header("Content-Type:
    text/vnd.wap.wml"); echo '<?xml version="1.0"
    encoding="utf-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head><meta
    http-equiv="Cache-Control" content="no-cache"
    forua="true"/></head> <card title="s60.nerds....
  4. Php Code? - Mathematical Applications (12)
    Hello, everyone. The help is needed again. How can I make calculator in PHP language? That will act
    like that a user just type in the fields known values, then click the button, and it's going to
    be solved automatically. In other words, have can I write a formula in PHP, how to plug it inside
    that language. For example, the formula to find a peremeter of square is: P=4a. So, a user
    just can write the known value which is peremeter itself and it will find the side of a square; and
    vice versa. If you can write many things how to do such formulas, such as comp...
  5. Create Table - Mysql Code - Help - (1)
  6. Php Source Code Unveiled In Browser? - is that possible? (7)
    I am quite new to PHP and this concern came to my mind after playing around a bit with it... When
    PHP is not correctly configured on the web server the source code of a php file we try to access
    through a browser will be shown instead of the result of the code itself. This will normally not
    happen when PHP is working properly, but I was just wondering if it could still be possible to see
    that code if a user wanted to or if something on the server failed. This would for example expose
    sensitive information like mysql passwords and so on... Is anything like that possib...
  7. Malicious Code Injection - (3)
    Hi everyone! This is my first post, so be kind! Basically, I'm trying to get a free
    host together so am writing some posts. Here's a little summin' summin' about malicious
    code injection with PHP applications. Basically, this security exploit is one of the oldest tricks
    in the books and all comes down to the fact that PHP allows execution of both local and remote
    scripts with the SAME function... dur. Anyway, this is how it works. Image you've just employed
    a young go getter, straight outta uni, who has found becoming a Jack of all trades a ...
  8. Php And Mysql Programming - anyone knows a code for mysql and php (2)
    hi everyone! I am making a program using php and mysql...I am a noob on this so i need your
    help guys...I want to make a simple program that will some values and then store them on a database
    and then retrieve them...uhmm let me give an example out put of what i need. This is the example
    say..: Enter First Name: Enter Last Name:
    Enter Age: Enter Address: ..those
    are the data needed for input values...my question now is how can I make a database...
  9. Adapting Html Code Embed To Work On Phpnuke - Help With This Html Code Pls (7)
    QUOTE how can get this html code to work on my phpnuke site? what tags would i
    have to enable in the $Allowable HTML part of my config.php file?? Edited topic title. Moved
    to Programming. ...
  10. Php Code Needed Iii - (10)
    Hello, everyone. I need your help again! Who might create the PHP code, the picture is
    above this text. Basically, I want when the user fill in all the information in this form, it
    automatically was sent to my email. And, then, the dialog box appears or on the same window, it was
    said that your request has been sent. Moreover, if the user did not fill the entire information,
    the dialog box appears stating that you did not fill some field. Thanks, for help. You always do
    that....
  11. Php Code Needed - Working Together? (5)
    Hello, everyone. I need your help again. This forum is quite good for it. Well, I need create a
    registration form for my web-site using PHP and SQL. The information it should contain: 1) User
    Name 2) First Name 3) Last Name 4) Password 5) e-mail Address 6) Security Image: that images helps
    to protect a random registration, for instance, 56+2=where user have to type an answer in order to
    finish registration. That's all for today. Anymore things, I will post another post over here.
    ...
  12. Php Code - Needed?! (15)
    Well, I am a novice in PHP programming, so there is a script which I wanna get: 1. You go the
    web-site 2. On the main screen, there is a some kind of field windows, the one you get used to type
    in, when you go to google, for instance. 3. He or she types her email address and it's going to
    be saved in my SQL database. 4. That's it. Help me if you can....
  13. Dynamic Image / Signature Generator - a simple code to change text on an image (12)
    In search of dynamically changing quote, saying or all other types of text on an image I came across
    a code that I have modified to fit my initial usage. This procedure requires two files and short
    knowledge of PHP. If you are familiar with Trap17's sig rotation code you will understand this
    procedure very fast. Code 1: dynamic_sig.php (you can rename this to index.php and you'll see
    at the end why) Code 2: a simple text file named anything (I will call it name.txt ) Code 1
    CODE <?php header("Content-type: image/png"); �...
  14. Change Permission With Php Code - code to change files' and folders' permissions? (3)
    As everyone know, there two ways (that I can think of) to change files' and directories'
    permissions. One is to change it in your cPanel's Disk Manager and the other is with an FTP
    client that supports chmod. Well, I'm doing something for my site that requires files to have
    full permissions (Execute, Write, and Read on all three groups). At first, I thought that if I made
    the directory 777, then every file created in that directory will be 777 as well. I'm wrong. An
    alternative to doing this is to change each file permission myself, but that would be...
  15. Use Rss In Php Code - (3)
    so, how can I make RSS reader on my website? thanks in advance...
  16. Php Clock - source Code (7)
    Hi Every one i find this code its very easy simple php clock i think you can use it /blink.gif'
    border='0' style='vertical-align:middle' alt='blink.gif' /> CODE <? // Binary Clock //
    script copyright© 2002 Andreas Tscharnuter // questions? contact: psychodad@psychodad.at ||
    [url=http://www.psychodad.at/clock/]http://www.psychodad.at/clock/[/url] //
    free to use, copy and modify but leave comments untouched;) // just include this file where
    your binary clock should appear // version 1.2   03 September 2003 // below you can ...
  17. Will This Code Work - php linking script ?p= (5)
    hi i'm not that great at php so i'm not to sure if this will work or not. but what i want to
    do is be able to use ?p=staff or what ever page name, with out the php extion, and i would like to
    no if this simple script i made would work. the code is: CODE <?php $p =
    $_GET['p']; if ( !empty($p) &&
    file_exists('./' . $p . '.php') && stristr( $p, '.'
    ) == False ) { // pages = directory where you store your pages    $file = './'
    . $p . '...
  18. I Need Some Proof Reading For My Code Please! [resolved] - (7)
    Well... everything is fine except the Content Select section (refer to the in-code headings)...
    thats where it says the error is... could anyone find out why it wont work when I click one of my
    links? http://2kart.trap17.com/progress.php for an example of what happens...
    //----------------- //portfolio paths //----------------- $portfolio = "/portfolio"; $lay
    = "/images"; //------------------ //navigation //------------------ $link = ·   Home
    html; $link = ·   Portfolio html; $link = ·   Programming html; $link = ...
  19. Awesome Source Code Viewer Script - (7)
    Hello! I have just came up with a sweet script to show the source code of any website and it
    only requires one file. This is the basis of the script and can be customized with CSS and other
    things and can be instituted as a public resource. Well I will provide the code and a step-by-step
    tutorial on each of its parts. This code has been tested by me. Enjoy! CODE <?php
    //This little tag starts our php script and is easily the most important part of the script. //We
    will start our base script here. //You can change some of the styles used here to your des...
  20. Whats Wrong>? - please see this piece of code and see whats wrong: (9)
    CODE require('connection2.php'); $select=mysql_query("SELECT * from
    `users` WHERE password='$_GET[password]'");
    $co=mysql_num_rows($select); if ($co = 1) {
    session_start(); $s=session_id();
    $_SESSION['access']="yes";
    $username=$_GET['username'];
    header("location:../main/index2.php?a=$_GET[username]&s=$s"
    ;); //echo "<a href='.&...
  21. How To Make A Random 7 Number Code? - (2)
    I am making a script in php, and for it I need to know how to make a random 7 digit code. I think it
    has something to do with md5, but i am not sure. Thanks! EDIT- Can someone please change the
    title to "How to make a random 7 digit code in php?" Thanks!...
  22. Php Education Class (first Code) - (0)
    Hi I want to educate some PHP codes that i think they will be useful for all of you! My 1st
    code is this: CODE <?php class calculator {          /**      * Variable for holding all
    the numbers to add      *      * @var array      */     private $numbers = array();
             /**      * Variable holding all the digits after the point      *      * @var array      */
        private $afterPoint = array();          /**      * Maximum number of digits after
    the point      * that a number has      *      * @var int      */     private $...
  23. My Code Doesnt Resize Large Images, Please Help. - (2)
    Can someone please have a look at the following code, this uploads an image, and make it in 2 sizes,
    one size is max. 600 x 800, uploads to images folder and second 120 x 120 and uploads to thumbs
    folder. this script works fine, with normal size images, but if i try to upload large pics( for
    example, an image with dimension 2432 x 3300, it shows blank page, and uploads the original image
    without sizing to "image" folder, and doesnt make any small thumbnail... I hope u understand..
    Please someone help me, i shall be so thankful. session_start(); header("Cache-contro...
  24. Some Basic Php Code Snippets For All Levels Of Experience - (3)
    Most of the code snippets are usually used for community driven sites but they do give some general
    idea on how php works. Don't forget if your starting out php for the first time that when
    saving php files that you need to have the .php extension on your files or they will not work.
    Display Browser info This piece of code displays a user's browser info on how they are seeing
    the website CODE <?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
    Actual Display- QUOTE Firefox - Mozilla/5.0 (Windows; U; Windows NT 5.1; ...
  25. Use Bb Code On Your Site! - Just like on forums! (7)
    To use this you must have PHP support on your server. Just use this code: CODE <?php
    $content = "Hello, World!"; $html = array('[b]',
    '[/b]', '[i]', '[/i]', '[u]',
    '[/u]'); $replacements = array ('<b>',
    '</b>', '<i>', '</i>', '<u>',
    '</u>'); $content = str_replace($html, $replacements,
    $content); ?&...
  26. More Dynamic ?id=browsing With Php (associative Array) - Just create array and watch php code do the rest (1)
    The thing that has been bugging me for a while was that switch statement that we use to create ID
    browsing (some use If-Ifelse but results are the same for both). I wanted to figure out a way to use
    more dynamic switch statement so that i only need to update my links array in order to create links
    for template. With use of foreach, array_keys, and in_array functions finally i managed to do so.
    Also i'm planing on changing foreach with array_walk but i'll do that later. Now for the
    code.. First we create an associative array something like this CODE $gl...
  27. Display The Current Date/time - With a simple PHP code (3)
    Use this code to display the current date and time. CODE <?php   $date =
    date('l dS \of F Y h:i:s A');   echo "$date"; ?>
    "l" would display the current day of the week such as Sunday. d displays the day of the month...
    such as 1 and S adds the appropriate suffix(st). /of simply displays the word "of". F displays the
    current month with no abbreviations while Y displays the four digit year(2007). "h" displays the
    current hour with leading zeros if necessary(Ex. 06 for 6 o'clock). "i" displays the m...
  28. You Want It, I Can Make It - Request some code (49)
    Ok, i have this idea. I can make just about anything with php, so i would like to propose an offer:
    Since i have absolutely no idea what to make i figured i could just have you guys tell me what you
    would like and i could make it for you. That way we both win, i get to make something without having
    to figure out what to make, and you get the code that you want. Sounds pretty simple doesnt it?
    OK! Well there are a few rules: 1) Do not post your ideas if you feel that you do not want them
    to be used by anyone else. However lets say that you want a forum as an example...
  29. Protecting My Code - from people that crack software (5)
    Is there any one way that I can protect something that I have written? 2 weeks ago I was contracted
    to write a script for a friend in California for $300. I have known him for a while, and I
    know he will respect my work, but if I sell this to other people how can I make sure they do the
    same? I would like to sell this script to others. I have thought of a couple possible ways to
    protect my code but I don't really like any of them. My question to you is whether I should use
    one of these ideas, or if there is a simpler way to protect my work. My first idea w...
  30. Help Me With My Code Please! - I can't find the bug! (4)
    Howdy, I've created a PHP script but it semms not to work, here's my script: if
    (isset($_POST )) { $melding = ""; if ($_POST == "" ) { $melding .= "Je
    moet eerst hier een map selecteren "; } else { $map = $_POST ;?>
    Afbeelding Naam Verwijder $handle=opendir($map);
    while (false!==($file = readdir($handle))) { if ($file != "." &&
    $file != "..") { ?> "; ?> " /> " /> ...



Looking for code

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for code

*MORE FROM TRAP17.COM*
advertisement



Need Some Code, Dont Know Where To Get It



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE