LegendBreath
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by LegendBreath
-
-
Nvm, solved here is what I use:
[code]
do{
$in = "#include";
if($pos = strpos($content, $in)){
$pos = strpos($content, $in);
$content = substr($content, 0, $pos) . "" . substr($content, $pos+strlen($in));
include(trim(substr($content, $pos, strpos($content, ";") - 1)));
$content = ReplaceOne(substr($content, $pos, strpos($content, ";")), "", $content);
}else{
break;
}
}while(0);
[/code] -
Here is a quick example:
<?php
echo('<input type="checkbox" name="anothercheckbox"');
if($_POST['checkbox'] == "SomeValue"){
echo(' checked');
}
echo('>');
?>
So now on the first form, the checkbox would have the value "SomeValue".
I think this is how you do that -
If you've never uploaded something using PHP, check out "Handling file uploads" http://www.php.net/features.file-upload
-
Hi there,
I want to have a page, like for example, that it gets from the MySQL database, if it's like for example, "#include layouts/default/enterpage.php;". I want it to read that it needs to include a page, and include this page. I know that I can do that by searching for all #include then look after the include and etc. but you know, is there any better way? -
Hey,
I got some problems to read the ID3 tags from my MP3's tags, strangly, for some mp3 it works and for some it doesn't. Here is a screenshot (Path, Artist, Album, Title).
[a href=\"http://xs.to/xs.php?h=xs100&d=06202&f=Untitled-5.jpg\" target=\"_blank\"][img src=\"http://xs100.xs.to/xs100/06202/Untitled-5.jpg.xs.jpg\" border=\"0\" alt=\"IPB Image\" /][/a]
The thing is that I want to remove those squares, before there was "ÿþ" symbols but I removed them.
Here is my code:
[code] $path = $_GET["path"];
$i = 0;
require('id3.class.php');
$myId3 = new ID3($mp3);
$files = filelist($path, 1, 0);
foreach ($files as $list) {
if (ereg (".mp3", $list['name'])) {
$mp3 = $list['path'].$list['name'];
$myId3->ID3($mp3);
if ($myId3->getInfo()){
$artist = str_replace("ÿþ", "", $myId3->getArtist());
$album = str_replace("ÿþ", "", $myId3->getAlbum());
$title = str_replace("ÿþ", "", $myId3->getTitle());
echo $list['path'].$list['name']." ".$artist." ".$album." ".$title.'<br>';
}else{
echo '<font color="red">'.$list['path'].$list['name'].'</font><br>';
}
$mp3array[$i] = $list['path'].$list['name'];
$i++;
}
}[/code]
Can someone help me?
What are those called? ($a ? $b : $c)
in PHP Coding Help
Posted
Hi there,
I've been using those kinds of lines a lot recently:
And was wondering, how is it called? And someone got examples of any others "syntax" that I could apply with those? Like I know that there is also ($a % $b : $c), or something like it.
Thanks!