[PHP]<?php
include("Global s.php");
$connection = mysql_connect(" localhost","roo t","drmz");
mysql_select_db ("drmzmove") ;
$Room = mysql_query("se lect id, ordre, name, e_name, f_name, p_name, color from Rooms where id ='" . get_id("id")."' ");
$Room = mysql_fetch_ass oc($Room);
$room1=$_REQUES T['id'];
$query=mysql_qu ery("select...
User Profile
Collapse
-
Is it possible? sure thing try this:
[php]
<?php
$page1 = true;
if ($page1) { header("Locatio n: index.php"); }
else {
header("Locatio n: page2.php");
}
?>
[/php]...Leave a comment:
-
To create the actual file you could use this by using pagename.php?pa ge_name=somepag e
[php]
<?php
$name = $_GET['page_name'];
$data = "Some Data";
$path = $_SERVER['DOCUMENT_ROOT'];
if (file_exists("$ path/$name.html")) { echo("Already exists!"); $exists = true; }
if (!empty($data) && !$exists) { file_put_conten ts("$path/$name.html", $data); }...Leave a comment:
-
What I think that is you forgot to change the variable $target to where you want to upload the files. Easier to narrow it down if you have the exact line # the error takes place on....Leave a comment:
-
Ah yeah I could of gone with that, oh well thanks for the correction it was late :(...Leave a comment:
-
Alright I got something working here tell me if it's what you wanted to do.
[php]
<?php
link(connect);
$eid = "100";
$user_id = "125";
$tbl_cat = "nuke_event_cat ";
$tbl_tmp = "nuke_event_use r_temp";
$tbl_usr = "nuke_event_use r";
$query = "SELECT $tbl_cat.date, $tbl_usr.code,...Leave a comment:
-
Here is a simple upload script that will allow certain files to be uploaded, after upload you can execute a query to the path of the image in the users information.
Page name: x.php
[php]
<?php
$target = "upload/path/insert/here/";
$target = $target . basename( $_FILES['file']['name']);
$image=($_FILES['file']['name']);
if (chk_file($imag e)) { $error...Leave a comment:
-
I believe I could help you figure this out, there is only one thing I need from you is a set of example data on what you are trying to accomplished. Anything will do just something I can use as reference to what you want done. Now I think the easiest way to do this would to be date & time comparisons....Leave a comment:
-
I don't know which example you picked but I fixed both of them so you can use either one.
[php]
<?php
echo "<html>
<body>
<a href='$PHP_SELF ?userID=$_GET[userID]'>link</a>
</body>
</html>
";
?>
[/php]
[html]
<html>
<body>
...Leave a comment:
-
You are comparing $login to $tlogin which in normal scripts you would get a variable from a sql database with a query..I have an example of what one would look like:
[php]
mysql_query("se lect clientdata.name from clients left join clientdata on clientdata.clie ntid=clients.cl ientid where clients.usernam e like '$username' and clients.passwor d='$md5p'")
[/php]
A way to secure this would be to encrypt the...Leave a comment:
-
If you are using php to simply connect and select data would require this.
[PHP]
<?php
$conn = oci_connect('us ername', 'password', 'database');
if (!$conn) {
$e = oci_error();
echo htmlentities($e['message']);
exit;
}
$query = 'SELECT * FROM DEPARTMENTS';
$stid = oci_parse($conn , $query);
if (!$stid) {
$e = oci_error($conn );...Leave a comment:
-
Welcome to the site, anyhow the error obviously occurs at line # 237:
function sql_num_rows.
To figure out the real error we would have to see were you are calling this function at it requires a string to calculate the number of rows the way it should be use would be.
$num_rows = mysql_num_rows( $result);
Basically that is what the function is doing for you.
Reply back with the main...Leave a comment:
-
[php]
<?php
include "config.php ";
//connect to the mysql server
$link = mysql_connect($ server, $db_user, $db_pass) or die("Could not connect to MySQL");
//select the database
mysql_select_db ($database) or die ("Could not select database");
// Selecting form the database
$query = mysql_query...Leave a comment:
-
Help with using $_GET
So I understand how to use $_GET, but I am having a problem with a certain string not returning the full length of it. I am making a script that involves searching a string now the string I am having trouble with is "DJ Unk - 2 Step Remix (Ft. T-Pain, Jim Jones & E-40)" the problem occurs at & it won't return it I have tried using filter's and other functions but no luck... I am using it such as "?search=DJ Unk - 2 Step Remix... -
No Error messages works exactly how I want but just doesn't add a new line after it writes the array.
so H.html looks like this:
asdasdaskdj0uoi uwqeiopqwueoiqu kojasdlqweqweqw oeuqoiweu
instead I want:
asdasda
asdasda
qweqwee
qweqwpoi
poipoipoii
etc
It outputs it to the browser but I also want it in another file so I can download it and save it....Leave a comment:
-
Trying to write array to file & add new line
[PHP]
<?php
function strRandom($leng th, $amount, $flag){
for ($i=0; $i<$amount; $i++){
$my_Array[] = randomkeys_($le ngth, $flag);
echo "{$my_Array["$i"]}";
$nbsp = "\r\n";
file_put_conten ts("h.html", $my_Array);
file_put_conten ts("h.html", $nbsp);
echo "<br />";
}
}
?>
... -
<?= no longer works after upgrading PHP
I'm trying to figure out what is wrong with my PHP installation, I am running PHP 5 and Apache with mySQL. I have been trying to use [code=php]<?=$filed('$use rname')?>[/code] within a input box:
[code=html] <td>Login:<?p hp if($e_username) echo(' <font color="#ff0000" >*</font>'); ?></td>
<td align="right">< input type="text" name="username" style="width:14 0px;"...
No activity results to display
Show More
Leave a comment: