Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Help Script PHP
Freakz Forum Index
->
Trash Bin
->
Trash
->
Programming / Scripting / Database
Author
Message
2176
icezone
[Mentally Stable]
Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59
,
Topics: 23
Location:
C:\windows\HERE
Reputation:
239.4
Votes
: 8
Posted: 03-04-2011, 17:04:55
| Translate post to:
... (
Click for more languages
)
Salut ! Ma tot chinui sa dau decap la un cod ...
si nu prea reusesc ...
am asa
Code:
$cmd = $_GET['cmd'];
if ($_GET["images"]=="cmd")
$cmd = cmd
{
echo"TEST $cmd";
}
Vreau sa fac gen "index.php?images=POZA(NR)&ip=xxx.xxx.xxx.xx&port=XXXX"
dar sa dea un echo cu ce a bagat ..gen POZA IP si PORT
Daca se poate sa ma ajutati
Multumesc !
Posturi unite automat, 03-04-2011, 18:04:55
prima am rezolvat-o
Code:
if ($_GET["images"])
$image = $_GET["images"];
{echo"TEST image : $image ";}
dar aia cu index.php?cerinta1=TEXT1&cerinta2=TEXT2
nu stiu sa o fac
hast
0
0
Back to top
Nexflame
[Newb Developer]
Status: Offline
(since 28-12-2022 15:28)
Joined: 19 Apr 2010
Posts: 1316
,
Topics: 24
Location:
Cluj-Napoca
Reputation:
1407.1
Votes
: 58
Posted: 03-04-2011, 18:29:48
| Translate post to:
... (
Click for more languages
)
Te referi la generarea URL-ului?
Daca da ai nevoie de un formular HTML.
Sa luam exemplu:
Code:
<form action="index.php" method="get">
Nume: <input type="text" name="nume" /><br />
Prenume: <input type="text" name="prenume" /><br />
<input type="submit" value="Trimite" />
</form>
acum cand apesi pe Submit, iti va genera codul.
Pentru a prelua acele info, in php le iei cu
Code:
$variabila1 = $_GET['nume'];
$variabila2 = $_GET['prenume'];
si te folosesti de ele ca si cum ar fi variabile "normale".
0
0
Back to top
icezone
[Mentally Stable]
Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59
,
Topics: 23
Location:
C:\windows\HERE
Reputation:
239.4
Votes
: 8
Posted: 03-04-2011, 18:43:00
| Translate post to:
... (
Click for more languages
)
Aaa nu ... asta o stiam
Ma refeream la prelungirea URL sau Multiple pagini intr-un php
EX:
Code:
if ($_GET["images"] == "1"){
if ($_GET["ip"]){
if ($_GET["port"]){
$images1 = poza1.png
$ip = $_GET["ip"];
$port = $_GET["port"];
echo " Ip-ul selectat este : $ip , Portul este $port iar poza este $images1";
}}}
asta face ca ce introduci in URL sa apara pe Index gen :
index.php?images=1&ip=IP.CARE.BAGI.TU&port=PORT CARE IL bAGI
Tare nu ? Singur am descoperit
am facut scripting SA:MP
hast
0
0
Back to top
Nexflame
[Newb Developer]
Status: Offline
(since 28-12-2022 15:28)
Joined: 19 Apr 2010
Posts: 1316
,
Topics: 24
Location:
Cluj-Napoca
Reputation:
1407.1
Votes
: 58
Posted: 03-04-2011, 19:00:19
| Translate post to:
... (
Click for more languages
)
Fi explicit ca nu am inteles nimic.
Ce vrei tu defapt sa faci?
P.s: Ce e asta SA:MP?
Dar asta "Multiple pagini intr-un php" ?
0
0
Back to top
nr913
[Banned user]
Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224
,
Topics: 223
Location:
România
Reputation:
60.3
Votes
: 156
Posted: 03-04-2011, 20:22:20
| Translate post to:
... (
Click for more languages
)
LOL? Din câte am înțeles, și nu prea am înțeles:
Code:
$cmd = $_GET['cmd'];
$ip = $_GET['ip'];
$port = $_GET['port'];
if ($cmd == 'poza') {
$poza = $_GET['poza'];
echo "Numele pozei: '$poza', IP: $ip, Port: $port";
}
Cu „scripting SA:MP” nu rezolvi nimic. Plus cã voi nu înțelegeți ce e aia „scripting”. Noi degeaba îți explicãm aici dacã tu nu o sã înțelegi nimic. Așa cã mai bine pune mâna și
învațã
niște PHP.
Attitude - A little thing that makes a BIG difference
0
0
Back to top
dannymitza
[Mentally Stable]
Status: Offline
(since 16-04-2011 00:22)
Joined: 31 Jan 2011
Posts: 2
,
Topics: None
Location:
Romania
Reputation:
62.7
Votes
: 2
Posted: 14-04-2011, 13:20:22
| Translate post to:
... (
Click for more languages
)
Nu prea am inteles ce vrei sa faci.
Ca sa faci un link de genul index.php?images=POZA(NR)&ip=xxx.xxx.xxx.xx&port=XXXX , se poate cu o baza de date (MySQL de exemplu).
Selectezi ce resurse vrei sa folosesti in link si le stochezi in variabile.
Dupa, creezi linkul:
Code:
//Codul de mai jos te redirectioneaza automat.
<?php
header("Location : index.php?cmd=" . $cmd . "&ip=" . $ip . "&port=" . $port . "");
?>
Daca:
$cmd = x;
$ip = 127.0.0.1; //localhost
$port = 5051; //exemplu
Linkul tau va fi:
http://domeniu.ro/index.php?cmd=x&ip=127.0.0.1&port=5051
Totusi, pe viitor fii mai explicit. Nu te putem ajuta daca nu ne explici cum trebuie.
0
0
Back to top
Tr3z3gu3T
[Mentally Stable]
Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493
,
Topics: 71
Location:
Romania
Reputation:
481.6
Votes
: 14
Posted: 14-04-2011, 22:43:54
| Translate post to:
... (
Click for more languages
)
grr prea multa bataie de cap.... vrea doar sa sa scoata detaliile din link, gen <form method=GET>
doar ca foloseste link direct fara formular.
Code:
<?php
/*
nume_fila.php?var1=def1&var2=def2&var3=def3&var4=def4
*/
echo 'var1' . $_GET["var1"] . '<br>';
echo 'var2' . $_GET["var2"] . '<br>';
echo 'var3' . $_GET["var3"] . '<br>';
echo 'var4' . $_GET["var4"] . '<br>';
?>
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
Trash
->
Programming / Scripting / Database
The time now is 11-11-2024, 15:24:10
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details