| | |
Can anybody help me in writing this very simple script
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
Hello,
I want to create my own script like www.anonym.to but with few additional features i want to use database, i believe its very easy to make but the problem i don't know php, i can write in visual basic and c++ but not php,
What do i want?? to make explaining easier i wrote a program in visual basic exactly i like i want it, download it from here, it will tell u everything
http://netmasterz.net/anonymizer.rar
I don't want the link to redirect automatically i want to store the links in database. So please if you can either create this script for me or guide me in the following:
I'm waiting to here from anyone,
regards and thanx in advance
I want to create my own script like www.anonym.to but with few additional features i want to use database, i believe its very easy to make but the problem i don't know php, i can write in visual basic and c++ but not php,
What do i want?? to make explaining easier i wrote a program in visual basic exactly i like i want it, download it from here, it will tell u everything
http://netmasterz.net/anonymizer.rar
I don't want the link to redirect automatically i want to store the links in database. So please if you can either create this script for me or guide me in the following:
- How to write in the database
- how to read from database
- when using the url http://domain.com/link=66 how can i read line 66 from the database??
- how to hyperlink a text by the link in the database??
I'm waiting to here from anyone,
regards and thanx in advance
Last edited by mr-cracker; Nov 17th, 2008 at 3:37 pm.
If you are new to php, perhaps some simple documentation will explain the basics of php. For mysql, check out http://www.tizag.com/mysqlTutorial/ and on the left side of the page are links to tutorials of each part of using mysql. Also you can get advanced documentation from http://www.php.net And if you are wondering what program to use, a text editor like notepad will do the job and just save the files with the php extension. The documentation should answer at least half those questions.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - MacGyver Fan
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - MacGyver Fan
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
Hi there, ok writing on database is very easy, but i don't know the following:--
1- When storing the links in the database, i want to get new link like this, domain.com/?link=89
where 89 represent row number where the link is stored??
2- when surfing the link, how can i read row 89 from the database and hyper a link with that link,
Please any reply, it will be really appreciated
regards
1- When storing the links in the database, i want to get new link like this, domain.com/?link=89
where 89 represent row number where the link is stored??
2- when surfing the link, how can i read row 89 from the database and hyper a link with that link,
Please any reply, it will be really appreciated
regards
•
•
•
•
Hi there, ok writing on database is very easy, but i don't know the following:--
1- When storing the links in the database, i want to get new link like this, domain.com/?link=89
where 89 represent row number where the link is stored??
2- when surfing the link, how can i read row 89 from the database and hyper a link with that link,
Please any reply, it will be really appreciated
regards
php Syntax (Toggle Plain Text)
<? $result=mysql_query("SELECT * FROM `table`") or die(mysql_error()); $rownum=0; while ($row=mysql_fetch_array($result)) { $rownum+=1; if ($rownum==89) //change 89 to row number to retrieve { break; } } //now if you have a column named field1 and want to display //its value on line 89 use the following echo $row['field1']; ?>
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - MacGyver Fan
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - MacGyver Fan
•
•
Join Date: Jun 2008
Posts: 62
Reputation:
Solved Threads: 3
•
•
•
•
Hi there, ok writing on database is very easy, but i don't know the following:--
1- When storing the links in the database, i want to get new link like this, domain.com/?link=89
where 89 represent row number where the link is stored??
2- when surfing the link, how can i read row 89 from the database and hyper a link with that link,
Please any reply, it will be really appreciated
regards
Here is the PHP code I'd use.
PHP Syntax (Toggle Plain Text)
<? $result=mysql_query("SELECT * FROM `table` WHERE ID=$_GET['link']") or die(mysql_error()); while ($row=mysql_fetch_array($result)) { $link = "<a href=\"".$row['link']."\">".$row['link']."</a>"; //If you create a column named `link_name` you could uncomment //the next line and comment the above line //$link = "<a href=\"".$row['link']."\">".$row['link_name']."</a>"; } //now if you have a column named link and want to display //its value as a link, use the following echo $link; ?>
<a href="http://www.daniweb.com/forums/forum17.html">http://www.daniweb.com/forums/forum17.html</a>
Or something like... (Second Example)
<a href="http://www.daniweb.com/forums/forum17.html">DaniWeb PHP Forum</a>
Hope this was of some help.
There are alot of people smarter than me, BUT at least I try to be of some help. Of coarse I'm not perfect, I need help too.
![]() |
Similar Threads
- Help with a simple script to automate batch file generation (Python)
- Perl SNMP Help (Perl)
- simple script request [account balance calculation] (JavaScript / DHTML / AJAX)
- IP-to-Country converter (php script) (PHP)
- Need scripting expert help (Shell Scripting)
- Problems writing script which checks the users group and date (VB.NET)
- Shell script for identifying FS TYPE and mounting via LOOP device (Shell Scripting)
- ASP.NET, referring to a DataSet within script (ASP)
- Writing a coupon on HTML language (HTML and CSS)
Other Threads in the PHP Forum
- Previous Thread: http request problem
- Next Thread: Name and Password login
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax alerts apache api array beginner binary broken cakephp checkbox class cms code convert cron curl database date directory display download dynamic echo email error file files folder form forms function functions google hack href htaccess html htmlspecialchars image include insert integration ip java javascript joomla limit link login loop mail menu methods mlm mod_rewrite multiple mysql network object oop overwrite parse paypal pdf php problem query radio random recursion redirect regex remote script search securephp server sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube






